Skip to contentSkip to conversation

help! tc filter dose not work..

LARTC 박 정은 1 participant 1 message Nov 18, 2002

lore
Share & tools
lore

박 정은

author
#0 lore raw

-------------- eth0------eth1 eth0------------

 |211.241.219.xx |  ---  |  ROUTER | ---    |192.168.1.4 |
  ---------------         ---------         ------------

when i send traffic from ROUTER to 211.241.219.xx or 192.168.1.4(masquraded),
the filter works fine...

In ROUTER, tc filter policy is like this:

tc filter add dev eth0 parent 1:0 protocol ip u32 match ip dport 80 0xffff flowid 1:12
tc filter add dev eth1 parent 1:0 protocol ip u32 match ip dport 80 0xffff flowid 1:12

but when i send traffic from 211.241.219.xx --> 192.168.1.4 or 192.168.1.4 --> 211.241.219.xx ,\
tc filter didn't recognize port80.

but when i tested another computer it works just fine(masqurade setting are same with above)
maybe some setting or modules are needed. but I couldn't found what i should do to work fine .

dose anyone know ? a slice hint can make me very very happy~~

In ROUTER port forwarding,and masqqurading policy are like this:

iptables -F
iptables -F -t nat
iptables -P FORWARD ACCEPT

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT
iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
iptables -t nat -A PREROUTING -i eth0 -p udp --dport 20 -j DNAT --to 192.168.1.4
iptables -t nat -A PREROUTING -i eth0 -p udp --dport 5001 -j DNAT --to 192.168.1.4
iptables -t nat -A PREROUTING -i eth0 -p udp --dport 80 -j DNAT --to 192.168.1.4
iptables -t nat -A PREROUTING -i eth0 -p udp --dport 21 -j DNAT --to 192.168.1.4
iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to 192.168.1.1 iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to 211.241.xx.xx

thanks in advance

_________________________________________________________________
상큼한 만남과 따뜻한 공동체 생활... 지금 MSN 커뮤니티에서 시작하세요!
http://groups.msn.com/?pgmarket=ko-kr

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/