* How to redirect OUTPUT traffic to another port
@ 2012-05-03 13:25 Oliver Sperke
0 siblings, 0 replies; only message in thread
From: Oliver Sperke @ 2012-05-03 13:25 UTC (permalink / raw)
To: netfilter
[-- Attachment #1: Type: text/plain, Size: 797 bytes --]
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 #2: S/MIME Kryptografische Unterschrift --]
[-- Type: application/pkcs7-signature, Size: 3893 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-05-03 13:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-03 13:25 How to redirect OUTPUT traffic to another port Oliver Sperke
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.