Starting VPN with bind to IP prevents all external traffic!

This forum is for all inquiries relating to the installation of OpenVPN from source and with binaries.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please visit (and READ) the OpenVPN HowTo http://openvpn.net/howto prior to asking any questions in here!
Post Reply
feratechinc
OpenVpn Newbie
Posts: 2
Joined: Mon Feb 22, 2016 9:37 am

Starting VPN with bind to IP prevents all external traffic!

Post by feratechinc » Mon Feb 22, 2016 9:46 am

So I have a server with dual WAN and 2 public IP addresses.

I'm trying to bind OpenVPN to connect to one WAN and leave the other public. However, as soon as I start the OpenVPN service it kills all external traffic and I need to remote into another local server to stop the service and be able to log back in.

The VPN and everything connects and works fine. I just need to leave the other interface alone. I don't understand why starting the service is messing with traffic on both interfaces if it's only bound to one IP.

Server Info:
Debian GNU/Linux 7.9
openmediavault 2.1.28
Linux Kernel 3.2.0-4-amd64

Code: Select all

client
dev tun
proto udp
local XXX.XXX.XXX.XXX
remote XXX.XXX.XXX.XXX 2049
##username and password in file called pass
auth-user-pass pass

resolv-retry infinite
persist-tun
persist-key

ca ca.crt
tls-auth ta.key 1

cipher AES-256-CBC
ns-cert-type server
comp-lzo
verb 3

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: Starting VPN with bind to IP prevents all external traff

Post by Traffic » Mon Feb 22, 2016 12:09 pm

feratechinc wrote:I don't understand why starting the service is messing with traffic on both interfaces
It is not the service .. it is that you are connecting to a server which probably redirects your default gateway.

feratechinc
OpenVpn Newbie
Posts: 2
Joined: Mon Feb 22, 2016 9:37 am

Re: Starting VPN with bind to IP prevents all external traff

Post by feratechinc » Mon Feb 22, 2016 1:42 pm

Isn't the point of binding the interface to prevent this?

Is there any way to have this work?

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: Starting VPN with bind to IP prevents all external traff

Post by Traffic » Mon Feb 22, 2016 2:55 pm

feratechinc wrote:Isn't the point of binding the interface to prevent this?
No.
feratechinc wrote:Is there any way to have this work?
Learn routing ..

Exercise:
  • Terminate ALL VPN connections
  • Post routing table before connection
  • Start VPN client which causes the problem
  • Post routing table after connection

Post Reply