example:
- Code: Select all
WEB_HEAD="10.178.198.133 10.178.198.136 10.178.198.138"
-A INPUT -i eth1 -m state --state NEW -m tcp -s WEB_HEAD -p tcp --dport 2049 -j ACCEPT
I have multiple rules that I want to use to accept traffic only from certain IPs and I know I can use
- Code: Select all
-A INPUT -i eth1 -m state --state NEW -m tcp -s 10.178.198.133/32,10.178.198.136/32,10.178.198.138/32 -p tcp --dport 2049 -j ACCEPT
and i twill expand to 3 separate rules but that to me is messy and ugly + if I ever need to update the ips I would have to do it on every rule . I want o be able to declare WEB_HEAD at start of iptables and re-use it throughout


