diff options
| author | Alon Bar-Lev <alon.barlev@gmail.com> | 2012-02-29 22:11:59 +0200 |
|---|---|---|
| committer | David Sommerseth <davids@redhat.com> | 2012-03-22 22:07:08 +0100 |
| commit | 34cb9132ef2dae08f91a66015ea5437539a4b557 (patch) | |
| tree | edd69bb83cc490a47692cb847d066231cd6146fd /sample/sample-scripts/bridge-start | |
| parent | fcff80aac1f71ebf881fbc269fb3c4df0789de6b (diff) | |
build: standard directory layout
Suitable for mature project.
root - administrative stuff
doc - documents
src - sources
tests - tests
distro - distro specific files
sample - samples
SIDE EFFECT: many changes to rpm spec.
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Acked-by: Adriaan de Jong <dejong@fox-it.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'sample/sample-scripts/bridge-start')
| -rwxr-xr-x | sample/sample-scripts/bridge-start | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/sample/sample-scripts/bridge-start b/sample/sample-scripts/bridge-start new file mode 100755 index 0000000..d20a260 --- /dev/null +++ b/sample/sample-scripts/bridge-start @@ -0,0 +1,39 @@ +#!/bin/sh + +################################# +# 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 |
