0

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: 10.0.1.4 Subnet: 255.255.254.0 Gateway: 10.0.0.1

dev tap0
tls-server
proto tcp
port 443
port-share 127.0.0.1 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
server-bridge 10.0.1.4 255.255.254.0 10.0.1.60 10.0.1.70
mssfix
persist-key
persist-tun
#log /var/log/openvpn
status /var/log/openvpn-status.log
verb 4
client-to-client
keepalive 10 120
mute 50
#set the dns servers
push "dhcp-option DNS 10.0.1.2"
#For windows, to make the network recognized
push "route 0.0.0.0 0.0.0.0 10.0.1.4"
cipher AES-256-CBC
auth SHA512
log-append /var/log/openvpn
comp-lzo
0

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 0.0.0.0 down
ifconfig tap0 0.0.0.0 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 10.0.1.4 netmask 255.255.254.0
route add default gw 10.0.0.1 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