File: libxt_comment.txlate

package info (click to toggle)
iptables 1.8.11-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,792 kB
  • sloc: ansic: 53,482; sh: 7,810; xml: 772; python: 755; makefile: 271
file content (8 lines) | stat: -rw-r--r-- 720 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
iptables-translate -A INPUT -s 192.168.0.0 -m comment --comment "A privatized IP block"
nft 'add rule ip filter INPUT ip saddr 192.168.0.0 counter comment "A privatized IP block"'

iptables-translate -A INPUT -p tcp -m tcp --sport http -s  192.168.0.0/16 -d 192.168.0.0/16 -j LONGNACCEPT -m comment --comment "foobar"
nft 'add rule ip filter INPUT ip saddr 192.168.0.0/16 ip daddr 192.168.0.0/16 tcp sport 80 counter jump LONGNACCEPT comment "foobar"'

iptables-translate -A FORWARD -p tcp -m tcp --sport http -s 192.168.0.0/16 -d 192.168.0.0/16 -j DROP -m comment --comment singlecomment
nft 'add rule ip filter FORWARD ip saddr 192.168.0.0/16 ip daddr 192.168.0.0/16 tcp sport 80 counter drop comment "singlecomment"'