Iptables mark incoming packet - vpn routing
- by Tom
I have connected my home to my workplace for out of house backup reasons through openvpn. The connection is working nicely.
At work I have 5 fixed IP addresses. Now I would like to assign one of these IP addresses to be forwarded to my home machine. I have confirmed packet arrival at my home machine with tcpdump.
The problem is that my default route at home is NOT the tun0 (naturally), but eth0 to my own ISP.
So I created a separate routing table to route my tun0 packets back to where they belong, but do not how to mark the incoming packet which arrive through tun0 with iptables, so I can drive them back.
I do not want any port restrictions, but only what comes from tun0 should leave through tun0
thanks
tom