iptables & ebtables
HI,netfilter-user
I have some question£¬pleas help me.
1\if I used ebtables process a package,but need iptables can't process THIS package,how can I do? 2\can i use iptables drop some LENGTH package, can I mach : if the package > 128K then DROP?
thanks you help
Quoted 5 lines · bend chen
HI,netfilter-user
I have some question,pleas help me.
1\if I used ebtables process a package,but need iptables can't process THIS package,how can I do?
Sorry, I can't parse this sentence
Quoted 1 line
2\can i use iptables drop some LENGTH package, can I mach : if the package > 128K then DROP?
Yes. Use the length match, e.g.
iptables -A INPUT -p tcp -m length --length --length 1501: -j DROP
will send all tcp-packets with more than 1500 bytes to nirvana. BTW, neither tcp (1500 bytes max) nor udp (65 KBytes max) will ever generate packets of the size you mentioned above. ICMP packets are even smaller - i don't recall max size at the moment.
HTH,
Joerg
Quoted 1 line · On Fri, 14 Oct 2005, [UTF-8] Jörg Harmuth wrote:
will send all tcp-packets with more than 1500 bytes to nirvana. BTW, neither tcp (1500 bytes max) nor udp (65 KBytes max) will ever generate packets of the size you mentioned above. ICMP packets are even smaller - i don't recall max size at the moment.
Both TCP and UDP is limited by the max IP packet size, approx 65KB for IPv4.
TCP normally generates small packets <1500, but if you disable Path-MTU discovery larger packets may be seen, just as can be seen with UDP.
Regards
Henrik