[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: iptables question



Ritesh Raj Sarraf wrote:
> Can someone shed some light on it ?
> 
> `iptables -A INPUT -d 192.168.1.1 -p tcp --dport ! 8080 -j DROP`
> 
> If I understand correctly the above rule says, "In the INPUT chain of
> iptables, if the destination IP address is 192.168.1.1 and the protocol is
> tcp and the destination port is 8080, then drop those packets".

The "!" inverts the logic of --dport.

So this is "...and the destination port IS NOT 8080..."



Reply to: