Iptables - Group Of Hosts
Is there any way in Iptables of being able to include a group of hosts to be able to access a service.
For example I have 3 machines on my network that I want to accept ssh connections to my machine but no others Rather than doing this: iptables -A FORWARD -s 192.168.1.5 -d 192.168.1.2 -p tcp --dport ssh -j ACCEPT iptables -A FORWARD -s 192.168.1.6 -d 192.168.1.2 -p tcp --dport ssh -j ACCEPT iptables -A FORWARD -s 192.168.1.7 -d 192.168.1.2 -p tcp --dport ssh -j ACCEPT |
You could figure out how masks work and try it that way ( although at most you'll be stuck with 4 hosts in the range, not the 3 you want ), or you could also do your /etc/hosts.allow and /etc/hosts.deny
|
All times are GMT -5. The time now is 08:06 PM. |