Skip to contentSkip to conversation

Why do my packets not pass the (nat) OUTPUT chain?

DISCUSSION Martin Kahlert 1 participant 1 message Dec 1, 2005

lore
Share & tools
lore
#0 lore raw

Hi!

i'm still struggling to redirect connections to outside hosts back to my local machine.

# cat /proc/sys/net/ipv4/ip_forward 
1
# iptables -t nat -L -v
Chain PREROUTING (policy ACCEPT 37 packets, 8394 bytes)
 pkts bytes target     prot opt in     out     source     destination   

Chain POSTROUTING (policy ACCEPT 79 packets, 4870 bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)

 pkts bytes target     prot opt in     out     source     destination   
    0     0 REDIRECT   tcp  --  any    any     anywhere   66.249.93.104  tcp dpt:smtp
# telnet 66.249.93.104 25
<CTR-C>  (can't work on www.google.com)
# iptables -t nat -L -v
Chain PREROUTING (policy ACCEPT 37 packets, 8394 bytes)
 pkts bytes target     prot opt in     out     source     destination   

Chain POSTROUTING (policy ACCEPT 83 packets, 5110 bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)

 pkts bytes target     prot opt in     out     source     destination   
    0     0 REDIRECT   tcp  --  any    any     anywhere   66.249.93.104  tcp dpt:smtp

seems, that my packets from the local machine only pass the POSTROUTING chain.

Why can't i redirect this traffic? Did i miss anything essential?

Thanks for any help in advance,
Martin.