File: libxt_multiport.txlate

package info (click to toggle)
iptables 1.8.13-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,684 kB
  • sloc: ansic: 53,529; sh: 8,343; xml: 772; python: 755; makefile: 271
file content (14 lines) | stat: -rw-r--r-- 832 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
iptables-translate -t filter -A INPUT -p tcp -m multiport --dports 80,81 -j ACCEPT
nft 'add rule ip filter INPUT ip protocol tcp tcp dport { 80, 81 } counter accept'

iptables-translate -t filter -A INPUT -p tcp -m multiport --dports 80:88 -j ACCEPT
nft 'add rule ip filter INPUT ip protocol tcp tcp dport 80-88 counter accept'

iptables-translate -t filter -A INPUT -p tcp -m multiport ! --dports 80:88 -j ACCEPT
nft 'add rule ip filter INPUT ip protocol tcp tcp dport != 80-88 counter accept'

iptables-translate -t filter -A INPUT -p tcp -m multiport --sports 50 -j ACCEPT
nft 'add rule ip filter INPUT ip protocol tcp tcp sport 50 counter accept'

iptables-translate -t filter -I INPUT -p tcp -m multiport --ports 10
nft 'insert rule ip filter INPUT ip protocol tcp tcp sport . tcp dport { 0-65535 . 10, 10 . 0-65535 } counter'