I want to route all traffic through another VPN-Node, while:
- Keep the Connection to the VPN-Server active (already works)
- Still accepting WAN-Connections on that Client.
My Client Node Configuration:
# 35.1.1.1: WAN IP of VPN-Server
# 192.168.8.1: WAN Gateway of Client
# 10.25.0.1: Internal VPN Server IP (not used below)
# 10.25.0.3: VPN Gatway for the Client (The gatway itself is also an Client)
ip route add 35.1.1.1/32 via 192.168.8.1 # protect route to VPN-Server
ip route del default via 192.168.8.1 # remove original default route
ip route add default via 10.25.0.3 # redirect to another VPN Node
When running these commands, the gateway works - Every traffic from the Client node is routed through the VPN Gateway (10.25.0.3), while keeping the connection to the Server (35.1.1.1/10.25.0.1) intact.
The only problem is, the Client will not accepting connections anymore. I read something about fwmark
and sourced based policy rules
but I do not get the point what I really need and what commands I need to enter.