Originally Posted by papaLou
I'm trying to figure out a way that my linux box will allow only one IP address to connect to a list of ports.
I don't know what IP address it will be but once I have one IP connected I want to drop all others.
Anyone have any hints?
Let say you want to give access only to 22.214.171.124 and to ports 80,443.
I think we can write it like this:
iptables -A INPUT -s ! 192.168.0.2 -p tcp -m multiport 80,443 -j DROP
Which means that if it's not the 192.168.0.2 host, well just drop it.
I'm not sure about it, but give it a try