Policy Based Routing for OpenVPN Client

This forum is for admins who are looking to build or expand their OpenVPN setup.
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
OpenVpn Newbie
Posts: 1
Joined: Thu Jun 11, 2020 10:00 pm

Policy Based Routing for OpenVPN Client

Post by TuckerTale » Thu Jun 11, 2020 10:13 pm


I've running a private server which is connected to the internet via VPN, but the problem is that I'm not able to access my OwnCloud from the internet when OpenVPN is connected. If I disconnect OpenVPN the port forwarding is working like a charm - so I've found policy based routing, but don't know what I'm configuring wrong that I'm not able to access my OwnCloud.


Code: Select all

Public-IP               ->  ISP-Rounter             ->  LAN-Router           ->  Linux Server / OpenVPN-Client           /
I've configured my ISP router to forward port 8080 to which forwards 8080 to, which works without connected OpenVPN. I think the problem is that the response is going through the VPN tunnel?

Now I've added a policy based route

Code: Select all

sudo ip rule add from table no_vpn
sudo ip route add dev eth0
sudo ip route add default via dev eth1
Won't work, probably something missing?!

Thank you for your help.

Post Reply