I have had a routed openvpn server running for some time.

I am trying to set up a bridged connection so that my vpn will be on the same subnet.

I have the following config file for the server. When I try and connect, I can, it will successfully do it. But I have no internet connection, local vpn connection. I also cannot ping the VPN sever.

Please could I have a hand?! What else do you need to see?

VPN IP: Subnet: Gateway:

dev tap0
proto tcp
port 443
port-share 444
ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/server.crt
key /etc/openvpn/easy-rsa/keys/server.key
dh /etc/openvpn/easy-rsa/keys/dh4096.pem
topology subnet
user nobody
group nogroup
#log /var/log/openvpn
status /var/log/openvpn-status.log
verb 4
keepalive 10 120
mute 50
#set the dns servers
push "dhcp-option DNS"
#For windows, to make the network recognized
push "route"
cipher AES-256-CBC
auth SHA512
log-append /var/log/openvpn

Revert your config to the last working one (without bridging), then you install the package bridge-utils and run the following commands (in the example i'm bridging your tap0 - eth0):

# switch to superuser and create the bridging interface
sudo bash
brctl addbr br0

# kill the bridged interfaces and add them to the bridge
ifconfig eth0 down
ifconfig tap0 down
brctl addif br0 eth0
brctl addif br0 tap0

# unshut the interfaces
ifconfig eth0 up
ifconfig tap0 up
ifconfig br0 up

# add ip addresses and rib information
ifconfig br0 netmask
route add default gw br0

You may want to add another local IP address as well. If so, add it to the bridge interface (br0). Good luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy