From fffd213c8cba2135afda493d797c41c10354770e Mon Sep 17 00:00:00 2001 From: Othmar Gsenger Date: Sat, 12 Apr 2008 11:38:42 +0000 Subject: big svn cleanup --- src/openvpn/sample-scripts/bridge-start | 39 +++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 src/openvpn/sample-scripts/bridge-start (limited to 'src/openvpn/sample-scripts/bridge-start') diff --git a/src/openvpn/sample-scripts/bridge-start b/src/openvpn/sample-scripts/bridge-start new file mode 100755 index 0000000..bfbbdc5 --- /dev/null +++ b/src/openvpn/sample-scripts/bridge-start @@ -0,0 +1,39 @@ +#!/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 +# with TAP interface(s) above. +eth="eth0" +eth_ip="192.168.8.4" +eth_netmask="255.255.255.0" +eth_broadcast="192.168.8.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 -- cgit v1.2.3