Currently on my Linux server I've enabled bridging so that I can use OpenVPN in bridged mode. Works great. eth0 is connected to the LAN; tun0 is the OpenVPN gateway; these are bridged to a new interface br0.
Same server is also functioning as a firewall/router (eth1 is the internet gateway) and hosting an httpd and several other daemons. Thus I had to reconfigure some of these to listen on br0 instead of eth0.
Thing is, I would like to dynamically tear down the bridge when not using OpenVPN and leave it the old way I had it, where eth0 is the gateway to the LAN.
Basically want I want to do is create a "symbolic link" to whatever is active at the given moment. Something like "lan0" which can "point to" either br0 or eth0.
I've heard about IP aliasing but it's a way to enable multiple IPs on a NIC, which isn't what I'm trying to do. Anyone point me in the right direction?
Or, is any performance penalty, if it exists, by leaving the bridge enabled even when not using it negligible enough that I shouldn't bother?