i would like to implement these rules below in puppet from puppet master to clients
Could anyone help me to get the script for this iptables rules, and in which file we want to have this below configurations
17x.x8.9x.10 (Execute below in this host)
sudo iptables -I INPUT 1 -p tcp --dport 80 -m comment --comment "Allow http connection" -j ACCEPT
sudo iptables -I INPUT 1 -p tcp --dport 443 -m comment --comment "Allow https connection" -j ACCEPT
17x.x8.9x.222 (Execute below in this host)
sudo iptables -I INPUT 1 -p tcp --dport 80 -m comment --comment "Allow http connection" -j ACCEPT
sudo iptables -I INPUT 1 -p tcp --dport 443 -m comment --comment "Allow https connection" -j ACCEPT
17x.x8.9x.33 (Execute below in this host)
sudo iptables -I INPUT 1 -p tcp -s 17x.18.89.1 --dport 8009 -m comment --comment "Allow MOUNTD" -j ACCEPT
sudo iptables -I INPUT 1 -p tcp -s 17x.18.89.2 --dport 8009 -m comment --comment "Allow MOUNTD" -j ACCEPT
sudo iptables -I INPUT 1 -p tcp -s 17x.18.89.34 --dport 60295 -m comment --comment "Allow MOUNTD" -j ACCEPT
sudo iptables -I INPUT 1 -p tcp -s 17x.18.89.34 --dport 2049 -m comment --comment "Allow NFS" -j ACCEPT
sudo iptables -I INPUT 1 -p tcp -s 17x.18.89.34 --dport 111 -m comment --comment "Allow portmapper" -j ACCEPT
sudo iptables -I INPUT 1 -p tcp -s 17x.18.89.35 --dport 60295 -m comment --comment "Allow MOUNTD" -j ACCEPT
sudo iptables -I INPUT 1 -p tcp -s 17x.18.89.35 --dport 2049 -m comment --comment "Allow NFS" -j ACCEPT
sudo iptables -I INPUT 1 -p tcp -s 17x.18.89.35 --dport 111 -m comment --comment "Allow portmapper" -j ACCEPT
17x.18.160.34 (Execute below in this host)
sudo iptables -I INPUT 1 -p tcp -s 17x.18.160.1 --dport 8009 -m comment --comment "Allow MOUNTD" -j ACCEPT
sudo iptables -I INPUT 1 -p tcp -s 17x.18.160.2 --dport 8009 -m comment --comment "Allow MOUNTD" -j ACCEPT
17x.18.89.35 (Execute below in this host)
sudo iptables -I INPUT 1 -p tcp -s 17x.18.89.1 --dport 8009 -m comment --comment "Allow MOUNTD" -j ACCEPT
sudo iptables -I INPUT 1 -p tcp -s 17x.18.89.2 --dport 8009 -m comment --comment "Allow MOUNTD" -j ACCEPT