Would this work with single proxy and no router machine? I am kind of banging my head here trying to make that setup work.
My setup: 1 linux proxy running ppp server.
Proxy ppp0 interface with ip 192.168.0.1, windows server client with ip 192.168.0.234.
$ip in the commands is external proxy server ip.
iptables -t nat -A PREROUTING -p tcp -m multiport --dport 2106,7777 -j DNAT --to-dest 192.168.0.234
iptables -t mangle -A PREROUTING -i eth0 -p tcp -m multiport --dport 2106,7777 -m tcp -j CONNMARK --set-mark 101
iptables -t mangle -A PREROUTING -i ppp0 -p tcp -m multiport --sport 2106,7777 -m tcp -j CONNMARK --restore-mark
ip rule add fwmark 101 table 101
ip route add default via $ip table 101
Any idea what i do wrong here?
This works, but server sees proxy IP as player IP:
iptables -t nat -A PREROUTING -p tcp -m multiport --dport 2106,7777 -j DNAT --to-dest 192.168.0.234
iptables -t nat -A POSTROUTING -j MASQUERADE
By the way first post has some typos. Chain is missing in commands with "--restore-mark"