9

Route traffic to some host in Internet via VPN server

view full story
linux-howto

http://serverfault.com – I need route traffic to some host in Internet via VPN server. Configuration: Computer: ubuntu-12.04 eth0 - x.x.x.x/24 tun0 - inet addr:10.8.0.6 P-t-P:10.8.0.5 Mask:255.255.255.255 There is OpenVPN server (Amazon): ubuntu-12.04 eth0 - y.y.y.y/24 tun0 - inet addr:10.8.0.1 P-t-P:10.8.0.2 Mask:255.255.255.255 There is host in Internet IP: q.q.q.q I want to traffic to q.q.q.q went throw OpenVPN server. For this I do: iptables: I mark packets in table mangle: sudo iptables -t mangle -A OUTPUT -d q.q.q.q -j MARK --set-mark 2 I send traffic to q.q.q.q throw tun0: sudo iptables (HowTos)