subject: Voip Solutions For Blocked Voip Countires [print this page] I am writing this howto with examples for all the users and administrator looking for a step by step guide of openvpn bridge mode as it is very much difficult for new users to install and configure openvpn in bridge mode . There are very much detailed howto and wiki on openvpn official website OpenVPN 2.0 HOWTO and Official document: but still it is difficult for new users.
Please follow the step by step configuration guide to install openvpn in bridge mode on linux ( fedora , centos, redhat) and other linux distributions as well .
Openvpn Ethernet Bridging
Step 1:
first of all you need install the linux on your system having two Network (Ethernet ) interface eth0 and eth1 . then you need to check the configuration for the network with "ifconfig -a" command and you will be having result as below :
Then you need to save the above ip configuration and proceed with another command "route -n " and the results will be as below :
#> route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.100.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
10.4.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 1003 0 0 eth0
192.168.0.0 192.168.100.254 255.255.0.0 UG 0 0 0 eth0
0.0.0.0 10.4.3.1 0.0.0.0 UG 0 0 0 eth1
you need to save this configuration on a notepad so you can use in future for comparision .
Step 2 :
Now you have completed the first step you need to install the bridge-utils.rpm package for your linux distribution , you can use either yum or you can download rpm and proceed . bridge-utils rpm build for : Fedora 10
once the bridge-utils installed on your system you need to create a bridge script so we will be creating a bridge scrip in next step .
Step 3:
Now you need to write the script for bridge to start so we are creating bridge-start file as below
#> cat /etc/openvpn/bridge-start
#!/bin/bash
#################################
# Set up Ethernet bridge on Linux
# Requires: bridge-utils
#################################
# Define Bridge Interface
br="br0?
# Define list of TAP interfaces to be bridged,
# for example tap="tap0 tap1 tap2?.
tap="tap0?
# Define physical ethernet interface to be bridged
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.100.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
10.4.3.0 0.0.0.0 255.255.255.0 U 0 0 0 br0
10.4.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1003 0 0 eth1
192.168.0.0 192.168.100.254 255.255.0.0 UG 0 0 0 eth1
0.0.0.0 10.4.3.1 0.0.0.0 UG 0 0 0 br0
Step 5 :
Once you have confirmed the configuration as mentioned in step 4 so need to move further to created openvpn server.conf file which is openvpn main configuration file for server to be run in bridge mode , so we start the server.conf file as below
#> cat /etc/openvpn/server.conf
;local a.b.c.d
port 1194
;port 5000
# TCP or UDP server?
;proto tcp
proto udp
dev tap0
;dev tun
;dev-node MyTap
ca sample-keys/tmp-ca.crt
cert sample-keys/server.crt
key sample-keys/server.key # This file should be kept secret
Note: It is very easy to install and config OpenVPN serverconfig OpenVPN server on Windows XP. We should remember add the bridge between the local network interface and the virtual network interface.
Congratulation! you are done with openvpn bridge setup on linux .