On Fri, 2011-08-12 at 11:26 +0200, J. Zeidler wrote: > English: > > Hello, > > I use a SSH-tunnel with Putty on Ubuntu 11.04. I want to achieve, that > the network traffic over a specific port is redirected over the tunnel. > I need this because of a strict firewall, which i can not configure. the > tunnel runs on localhost:9999. i can use this as proxy with firefox, so > the tunnel works. i tried this without success: > > iptables -A OUTPUT -t nat -p udp -d 65.18.193.12 -j DNAT --to 127.0.0.1:9999 I think you should use REDIRECT instead. man iptables: REDIRECT This target is only valid in the nat table, in the PREROUTING and OUTPUT chains, and user-defined chains which are only called from those chains. It redirects the packet to the machine itself by changing the destination IP to the primary address of the incoming interface (locally-generated packets are mapped to the 127.0.0.1 address). --to-ports port[-port] This specifies a destination port or range of ports to use: without this, the destination port is never altered. This is only valid if the rule also specifies -p tcp or -p udp. -- Rob -- 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