Little problem with ifb. How to catch server traffic on IFB...

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've network with NATed hosts.

I want to catch only all traffic going from my server, but I don't want
catch NATed traffic from LAN.

I need only traffic going from/to my server (traffic from INPUT, OUTPUT
chain in iptables) (like SSH, postfix, WWW or proxy).

This is throw all traffic from my LAN to IFB:

$TC qdisc add dev $iface_lan handle ffff: ingress
$TC qdisc add dev $iface_lan root handle 1:0 htb
#Incoming traffic...
$TC filter add dev $iface_lan parent 1:0 protocol ip prio 1 u32 match ip
dst 192.168.0.0/16 flowid 1:1 action mirred egress redirect dev ifb0
#Outgoing traffic...
$TC filter add dev $iface_lan parent ffff: protocol ip prio 1 u32 match
ip src 192.168.0.0/16 flowid 1:1 action mirred egress redirect dev ifb1

I need some rules to throw all traffic from my server to ifb.
This rules throw all traffic from my router, all with NATed LAN
traffic... And there is no way to filter this traffic:/

$TC qdisc add dev $iface_wan handle ffff: ingress
$TC qdisc add dev $iface_wan root handle 1:0 htb
#Incoming traffic...
$TC filter add dev $iface_wan parent ffff: protocol ip prio 1 u32 match
ip dst $server_external_IP flowid 1:1 action mirred egress redirect dev ifb0
#Outgoing traffic...
$TC filter add dev $iface_wan parent 1:0 protocol ip prio 1 u32 match ip
src $server_external_IP flowid 1:1 action mirred egress redirect dev ifb1

I need some help... Is any possibility to do this? How to catch packets
which is not from/to LAN - on WAN interface?

_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux