OpenVPN client on virtual machine with Ubuntu18 OS on Microsoft Azure cannot start. #118
-
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
@linexc Hey, it instantly sounds like the default gateway is replaced when the connection starts. But that needs to be verified more closely. The |
Beta Was this translation helpful? Give feedback.
-
Hi @dsommers |
Beta Was this translation helpful? Give feedback.
-
@dsommers I find it cannot be stopped after I press ctr -C. |
Beta Was this translation helpful? Give feedback.
-
Okay, so you lose connection because the default gateway to your host is changed. Notice line 4 in the You need to figure out what you want with your VPN connection - to route all the Internet traffic via the VPN connection? Or just some subnets? If you want to route everything, you need to add an explicit route ensuring the IP address (or range) you connect from is not routed via the VPN tunnel. If you know which IP subnets you want to route via the tunnel, then you can use a different approach by adding a few additional options to your VPN config, like That said, this configuration file does not behave like it is intended to be used on a headless server anywhere. It sounds more like a config expected to be used on local devices you have physical access to. Do ensure you're not violating any terms of service. Since this is not a bug in OpenVPN 3 Linux, I will convert this issue into a discussion topic instead. |
Beta Was this translation helpful? Give feedback.
Okay, so you lose connection because the default gateway to your host is changed. Notice line 4 in the
[LOG] OPTIONS:
part. This is why. And this is the expected behavior when you change the default gateway.You need to figure out what you want with your VPN connection - to route all the Internet traffic via the VPN connection? Or just some subnets? If you want to route everything, you need to add an explicit route ensuring the IP address (or range) you connect from is not routed via the VPN tunnel. If you know which IP subnets you want to route via the tunnel, then you can use a different approach by adding a few additional options to your VPN config, like
pull-filter
androute
lines, wh…