OpenVPN Bridge loses connectivity when stopping (Solved)

Anything not about Mac emulation.

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
mjd_tech
Space Cadet
Posts: 3
Joined: Mon Dec 17, 2018 11:49 pm

OpenVPN Bridge loses connectivity when stopping (Solved)

Post by mjd_tech »

I had set up the openvpn bridge on a raspberry pi 3B, running OSMC.

It works, but if you manually stop the openvpn server with

Code: Select all

sudo service openvpn stop
the eth0 adapter is no longer "up" and you have no network access.

After much troubleshooting, I found the problem lies in the openvpn-bridge script, in the "stop" section.
Apparently, after the bridge interface br0 is deleted, the eth0 adapter goes into the "down" state.

To Fix:
In the "stop" section of the script, change this line:

Code: Select all

ip link set $eth promisc off
to this:

Code: Select all

ip link set $eth promisc off up
The weird thing is, I first ran this on Ubuntu 16.04, and you do not need to add "up"
But on the Pi, you do.
Might be due to different kernels and/or different versions of the ip command.
Or possibly the network manager software. OSMC uses something called "conman"
Or possibly different chipsets/drivers for the network interface.

Regardless, I don't think it would hurt anything to add "up", even if it's not strictly needed.
So I suggest the openvpn-bridge script on the wiki be modified to include this.

Many thanks for this setup guide. It worked perfectly on Ubuntu 16.04
and I was puzzled why I was having problems with the Pi running OSMC,
which is basically Debian that auto launches Kodi.

-MD
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: OpenVPN Bridge loses connectivity when stopping (Solved)

Post by adespoton »

IP has changed a bit since 16.04; I found this out upgrading to 18.04. I guess we should update the wiki to highlight that some versions of ip will require up at the end.
NucAr
Tinkerer
Posts: 69
Joined: Mon Aug 13, 2012 1:42 am

Re: OpenVPN Bridge loses connectivity when stopping (Solved)

Post by NucAr »

Thanks. I've edited the guide.
Post Reply