5

port redirection through a VPN

view full story
linux-howto

http://serverfault.com – I would like redirect my tcp traffic to IRC throught a VPN. I mark the packets with iptables and create a new route for this packets: echo 1 > /proc/sys/net/ipv4/ip_forward echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter iptables -t mangle -A OUTPUT ! -d 192.168.0.0/16 -p tcp --dport 6667 -j MARK --set-mark 0x42 ip route add table VPN default dev tun0 ip rule add fwmark 0x42 table VPN ip route add default via 10.5.82.5 dev tun0 table VPN The VPN connection: # ifconfig tun0 tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet adr:10.5. (HowTos)