OpenVPN Bridge LAN-to-LAN Configuration?

Posted by Shad Reese on Super User See other posts from Super User or by Shad Reese
Published on 2012-11-25T23:52:21Z Indexed on 2012/11/27 11:09 UTC
Read the original article Hit count: 640

Filed under:
|
|

I'm trying to configure an OpenVPN bridge LAN-to-LAN setup. Currently, I have the OpenVPN bridge Server/Client setup up running. On the server-side my br-lan interface has tap0, eth0, and wlan0 in the bridge group. On the client-side the br-lan interface has eth0 and wlan0 in the bridge group, the client tap0 is outside of the br-lan group.

Currently the two bridge groups are connected via the wlanO interfaces (server-side is the Access Point - AP and the client-side is the wireless client). My goal is to connect the two bridge groups with a wireless VPN pipe.

My network configuration:

Server: br-lan: 10.4.96.50

Client: br-lan: 10.4.96.75 tap0: 10.4.96.100 <---- issued by the VPN server.

Unfortunately, I'm stuck with using a bridge instead of a routed OpenVPN setup. My question is how (if possible) do I add the client tap0 interface to the client bridge group, as to ensure all traffic between the server/client bridge groups is using the VPN pipe?

SERVER CONFIG FILE.

config openvpn sample_server

# Set to 1 to enable this instance:
option enable 1

    option port 1194
option proto udp
option dev tap0
    option key /etc/easy-rsa/keys/server.key
    option dh /etc/easy-rsa/keys/dh1024.pem
option ifconfig_pool_persist /tmp/ipp.txt
option server_bridge "10.4.96.50 255.255.255.0 10.4.96.100 10.4.96.200"
    list push "redirect-gateway local def1"
list push "dhcp-option DNS 10.4.96.14"
    option duplicate_cn 1
    option comp_lzo 1
option max_clients 100
option log         /tmp/openvpn.log
option verb 3



CLIENT CONFIG FILE:
config 'openvpn' 'sample_client'
option 'enable' '1'
option 'client' '1'
option 'dev' 'tap'
option 'proto' 'udp'
list 'remote' '10.4.96.50 1194'


option 'status' /tmp/openvpn-status.log
option 'log' /tmp/openvpn.log
option 'ca' '/etc/easy-rsa/keys/ca.crt'
option 'cert' '/etc/easy-rsa/keys/client.crt'
option 'key' '/etc/easy-rsa/keys/client.key'
option 'comp_lzo' '1'
option 'verb' '5'

Thanks in advance,

© Super User or respective owner

Related posts about networking

Related posts about vpn