How to redirect OUTPUT traffic to another port

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

 



Hi,

I googled for hours, but could not find an answer. I establish a ssh
tunnel on server 1. The traffic is marked on the OUTPUT chain with the
owner attribute and then redirected on ip route to server 2. Everything
works so far. But how do I redirect the outgoing traffic from port 80 to
port 3080r? As far as I understand I can use the the OUTPUT chain to
redirect the port but then nothing works anymore. It seems like the
traffic is just dropped. My idea was:

iptables -t mangle -A OUTPUT -m owner --uid-owner 2000 -j MARK
--set-mark 0x1
32765:  from #serverip# fwmark 0x1 lookup #gateway#

This works so far, but this not:

iptables -t nat -A OUTPUT -s #serverip# -m owner --uid-owner 2000 -p tcp
--dport 80 -j REDIRECT --to-ports 3080

Can anybody help me?

Oliver

Attachment: smime.p7s
Description: S/MIME Kryptografische Unterschrift


[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