I'd like optimize my iptables script setting to variable the list of ports:
# allowed services
PORTS=21,22,23
iptables -A INPUT -p tcp --match multiport --dports $PORTS -j ACCEPT
is this the correct way?
I'd like optimize my iptables script setting to variable the list of ports:
# allowed services
PORTS=21,22,23
iptables -A INPUT -p tcp --match multiport --dports $PORTS -j ACCEPT
is this the correct way?
I didn't think you could put variables in the iptables.conf. In the past when this was needed I would create a bash script wrapped around iptables to create/update needed values within iptables.