I am setup CentOS 6 and successful run OpenVPN server.
All clients connect for server.
My target: Combine two networks use server-bridge option.
I am read offical documentation and use this manual: http://openvpn.net/index.php/open-source/documentation/miscellaneous/76-ethernet-bridging.html
My settings:
========== OpenVPN server config ============== local $IP_ADDRESS_DROPPLET mode server tls-server tls-timeout 120 proto tcp-server dev tap port 1194 daemon tls-auth /etc/openvpn/easy-rsa/keys/ta.key 0 ca /etc/openvpn/easy-rsa/keys/ca.crt cert /etc/openvpn/easy-rsa/keys/vpn-server.crt key /etc/openvpn/easy-rsa/keys/vpn-server.key dh /etc/openvpn/easy-rsa/keys/dh1024.pem
ifconfig 172.16.2.1 255.255.255.0 #ifconfig-pool 172.16.2.5 172.16.2.200 ifconfig-pool-persist /var/log/openvpn-ipp.txt
server-bridge 172.16.2.4 255.255.255.0 172.16.2.2 172.16.2.200
status /var/log/openvpn-status.log 1 status-version 2
push “route-gateway 172.16.2.1” client-to-client verb 3 cipher BF-CBC persist-key log-append /var/log/openvpn.log persist-tun comp-lzo user nobody group nobody
================= END ==============
=========== bridge-start.sh ================== #!/bin/bash
br=“br0”
tap=“tap0”
eth=“eth0” eth_ip=“172.16.2.4” eth_netmask=“255.255.255.0” eth_broadcast=“172.16.2.255”
for t in $tap; do openvpn --mktun --dev $t done
brctl addbr $br brctl addif $br $eth
for t in $tap; do brctl addif $br $t done
for t in $tap; do ifconfig $t 0.0.0.0 promisc up done
ifconfig $eth 0.0.0.0 promisc up
ifconfig $br $eth_ip netmask $eth_netmask broadcast $eth_broadcast
================= END ==============
use this is manual http://xmodulo.com/2013/04/how-to-configure-linux-bridge-interface.html and another documentation i am configure br0 for OpenVPN.
Step 1: Write /etc/sysconfig/network-scripts/ifcfg-eth0
========= CONTENT ifcfg-br0 =================== DEVICE=eth0 TYPE=Ethernet BRIDGE=br100 ==================== END ==========================
Step 2: Write /etc/sysconfig/network-scripts/ifcfg-br0
========= CONTENT ifcfg-br0 =================== DEVICE=br0 TYPE=Bridge BOOTPROTO=static DNS1=8.8.4.4 NM_CONTROLLED=“yes” HWADDR=04:01:13:49:60: IPADDR= $IP_ADDRESS_DROPPLET NETMASK=255.255.255.0 GATEWAY=$GATEWAT_ADDRESS_DROPPLET PREFIX=24 ONBOOT=yes STP=no ==================== END ==========================
Step 3: After i am try bridge-start.sh server lost connect with internet.
Login to VNC console and ifconfig show me:
eth0 - dont have IP address
br0 have 172.16.2.1 IP address
$IP_ADDRESS_DROPPLET is not setup for interfaces.
I thnink i do mistake in configuration for br0. Maybe Digital ocean blocked not-standart network configuration ? Dont know.
How to setup correct network settings?
IMPORTANT - Offical OpenVPN documentation have notice:
========= QUOTE ========= A common mistake that people make when manually configuring an Ethernet bridge is that they add their primary ethernet adapter to the bridge before they have set the IP and netmask of the bridge interface. The result is that the primary ethernet interface “loses” its settings, but the equivalent bridge interface settings have not yet been defined, so the net effect is a loss of connectivity on the ethernet interface. ========= QUOTE END ======
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I notice that in some places in your configuration you use “br100” and others, you use “br0” Was that just a typo when you pasted the information here, or is that what you are actually using? Try picking one consistently through out you configuration files.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.