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

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

 



Hi!
Thanks for your fast answer!!

How can I write -t nat
    [all except these 2:]    (! -d 127.0.0.1 -and  ! -d  192.168.0.0/16)  ?

Can I generally generate (kernel-hanging) loops with -nat , or is this
recognized/inhibited ?

Please also To:/Cc:inform@xxxxxxxxxxxxxxxxxx !
thanks
Andrew

On 2013-07-12 14:10, Arturo Borrero Gonzalez wrote:
> 2013/7/12 Die Optimisten <inform@xxxxxxxxxxxxxxxxxx>:
>   
>> Hallo!
>>
>> I want to DNAT all incoming 0/0:443, except those to localhost:443
>>         to my proxy localhost:8000
>> What is the best line to achive that?
>>
>> -d 0/0:443  -and ! -d 127.0.0.0
>> # seems -and does not exist...
>>
>> THANKS,
>> Andrew
>>
>> Please be so kind, and also answer to me per email, I#m not in the
>> mailinglist
>>
>>     
> I would try this:
>
> iptables -t nat -A PREROUTING ! -d 127.0.0.1 -p tcp --dport 443 -j
> DNAT --to-destination 127.0.0.1:8000
>
> Regards.
> --
> Arturo Borrero González
>   

--
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