Install OpenVPN ethernet bridge on dhcp server

Need help configuring your VPN? Just post here and you'll get that help.
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
c0c0n4t
OpenVpn Newbie
Posts: 4
Joined: Fri Oct 09, 2020 8:54 am

Install OpenVPN ethernet bridge on dhcp server

Post by c0c0n4t » Fri Oct 09, 2020 9:29 am

Hi guys, I'm a total noob on this thing and I barely used linux so please be patient with me (Im using ubuntu 16.04) . I'm trying to create VPN bridge and followed the instruction on https://openvpn.net/community-resources ... -bridging/
thing is when I called the ifconfig, the ethernet showed the public IP address, so I suspect the VPC I rented is on dhcp.

also i changed some config on /etc/network/interfaces as following

#source /etc/network/interfaces.d/*

Code: Select all

auto lo
iface lo inet loopback

auto br0
iface br0 inet static
address x.x.x.46 // this one is the public IP from ifconfig
netmask 255.255.255.0
gateway x.x.x.173 /// this one i retrieve from typing route -n 

bridge_ports ens3
bridge_stp off
bridge_fd 0
bridge_maxwait 0

ifconfig result:

Code: Select all

br0       Link encap:Ethernet  HWaddr 56:00:03:00:b3:9f
          inet addr:x.x.x.46  Bcast:x.x.x.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:12467 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10929 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:8891080 (8.8 MB)  TX bytes:1590896 (1.5 MB)

ens3      Link encap:Ethernet  HWaddr 56:00:03:00:b3:9f
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:424967 errors:0 dropped:0 overruns:0 frame:0
          TX packets:403862 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:288017618 (288.0 MB)  TX bytes:287691949 (287.6 MB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:54 errors:0 dropped:0 overruns:0 frame:0
          TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:6296 (6.2 KB)  TX bytes:6296 (6.2 KB)

tap0      Link encap:Ethernet  HWaddr fa:7b:1b:c7:33:9b
          UP BROADCAST PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

bridge status:

bridge name     bridge id               STP enabled     interfaces
br0             8000.56000300b39f       no              ens3
                                                        tap0
Server config

port 443
proto udp
dev tap0
dev-node tap-bridge
ca ca.crt
cert server.crt
key server.key
client-to-client
dh dh2048.pem
topology subnet
ifconfig-pool-persist ipp.text
server-bridge (public IP) 255.255.255.0 (public IP).100 (public IP).255 // I FEEL THIS IS VERY WRONG BUT IDK WHAT TO PUT :<

push "redirect-gateway def1 bypass-dhcp"

push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"

keepalive 10 120

tls-auth ta.key 0 # This file is secret

cipher AES-128-CBC # AES
auth SHA256
comp-lzo

user nobody
group nogroup

persist-key
persist-tun

Client config

client
dev tap
dev-node tap-bridge
proto udp
remote host 443
resolv-retry infinite
nobind

user nobody
group nogroup

persist-key
persist-tun
ca ca.crt
cert client.crt
key client.key

cipher AES-128-CBC
auth SHA256
remote-cert-tls server

key-direction 1
comp-lzo

# Set log file verbosity.
verb 6

the openVPN return this error:

Code: Select all

Fri Oct 09 17:25:38 2020 us=567015 read UDP: Unknown error (code=10054)
however I can still ping the VPC no problem. Any help would be really appreciated

I managed to connect with TUN already but when I start the bridge config I just cant connect the VPN to the server. I needed the bridge so I can connect client to client
Last edited by Pippin on Fri Oct 09, 2020 12:51 pm, edited 1 time in total.
Reason: Formatting

Post Reply