Skip to contentSkip to conversation

iptables Qu2: how to specify !dst:port

DISCUSSION Die Optimisten 2 participants 2 messages Jul 12, 2013

lore
Share & tools
lore
#0 lore raw

Hi again!

Do I get a loop if I
iptables -t nat -D PREROUTING -p tcp -d 0.0.0.0:443 -j DNAT --to-destination 127.0.0.1:443
(if my proxy would be at the same port 443) ?

thanks again,
Andrew

Mail: inform <AT> ## Newline just against mailfiltering-robots
die-optimisten <DOT> net

#1 lore raw
Quoted 4 lines · Die Optimisten

Do I get a loop if I
iptables -t nat -D PREROUTING -p tcp -d 0.0.0.0:443 -j DNAT --to-destination 127.0.0.1:443

No. By the way, this rule may not have the intended effect. Packets received from the outside will be seen with a loopback destination address and discarded by the routing decision. Packets sent over loopback skip the nat PREROUTING chain.

Quoted 2 lines

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

Not directly in the kernel, because, as I wrote above, packets sent over loopback skip the nat PREROUTING chain.