Re: iptables Qu: how to specify !dst:port

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

 



Hello,

Arturo Borrero Gonzalez a écrit :
> 2013/7/12 Die Optimisten <inform@xxxxxxxxxxxxxxxxxx>:
>>
>> How can I write -t nat
>>     [all except these 2:]    (! -d 127.0.0.1 -and  ! -d  192.168.0.0/16)  ?
> 
> I would do it with ipset(8).

ipset is overkill for just a couple of prefixes.

iptables -t nat -A PREROUTING -d 192.168.0.0/16 -p tcp --dport 443 \
  -j RETURN
iptables -t nat -A PREROUTING ! -d 127.0.0.1 -p tcp --dport 443 \
  -j DNAT --to 127.0.0.1:8000
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux