OpenVPN bridging

Server side:

  • Step 1: Add the following lines to /etc/openvpn/ovpn/server.ovpn.
dev tap
server-bridge 192.168.13.1 255.255.255.0 192.168.13.2 192.168.13.100

Note that 192.168.13.1 is the gateway of br-lan, 192.168.13.2 is IP address pool start, 192.168.13.100 is IP address pool end, it has to non-conflict with LAN’s DHCP IP address pool(it is start with 100 by default).

  • Step 2: Edit network uci configuration file /etc/config/network.
config interface 'lan'
	option type 'bridge'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option hostname 'GL-AR750-446'
	option ipaddr '192.168.13.1'
	option ifname 'eth1.1 tap0'
	option proto 'static'
  • Step 3: Start OpenVPN Server on admin web page.

Client side:

  • Step 1: Change client.ovpn.
dev tap
  • Step 2: Edit network configuration file /etc/config/network.
config interface 'lan'
	option type 'bridge'
	option ifname 'eth0.1 tap0'
	option proto 'dhcp'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option hostname 'GL-AR750S-f5a'
	# option ipaddr '192.168.8.1'
  • Step 3: Edit dhcp configuration file /etc/config/dhcp .
config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option force '1'
	option dhcpv6 'server'
	option ra 'server'
	option ignore '1'

config interface 'ovpn'
	option ifname 'none'
	option proto 'none'
  • Step 4: Restart dnsmasq.
/etc/init.d/dnsmasq restart
  • Step 5: Upload client.ovpn, and start it.