iptables-restore failed in Debian buster/sid if it has --multiport option in the rules file
1
vote
1
answer
3227
views
I have
/etc/iptables/rule.v4
file contains many rule, the below is the line where I see the issue
-A INPUT -p tcp -m multiport --dports 22 -j ACCEPT
-A INPUT -p udp -m multiport --dports 16384:32768 -j ACCEPT
When I tried to do iptables-restore
it failed with below error
root@rs-dal:/etc/iptables# iptables-restore rules.q
iptables-restore v1.8.2 (nf_tables): multiport needs -p tcp',
-p udp', -p udplite',
-p sctp' or `-p dccp'
Error occurred at line: 26
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
root@rs-dal:/etc/iptables#
why is it failing?, the same rule had worked successfully on Debian Jessie
.
Also when I changed the rules like below, it worked.
-A INPUT -p tcp --dport 22 -j ACCEPT
-A INPUT -p udp --dport 16384:32768 -j ACCEPT
I checked the iptables -L
and these rules applied successfully as below
ACCEPT udp -- anywhere anywhere udp dpts:16384:32768
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
Whether the rule that I currently have is a valid syntax?
Below is my OS details
root@rs-dal:/etc/iptables# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux buster/sid"
NAME="Debian GNU/Linux"
ID=debian
HOME_URL="https://www.debian.org/ "
SUPPORT_URL="https://www.debian.org/support "
BUG_REPORT_URL="https://bugs.debian.org/ "
Asked by Karthik
(189 rep)
Mar 22, 2019, 02:42 PM
Last activity: Mar 22, 2019, 08:12 PM
Last activity: Mar 22, 2019, 08:12 PM