~ubuntu-branches/ubuntu/hardy/openvpn/hardy-security

« back to all changes in this revision

Viewing changes to sample-scripts/bridge-start

  • Committer: Bazaar Package Importer
  • Author(s): Alberto Gonzalez Iniesta
  • Date: 2005-01-05 19:03:11 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050105190311-mvqzpuhmlvobg9nh
Tags: 1.99+2.rc6-1
* The 'Three Wise Men' release.
* New upstream release.
* Update README.Debian with comments on changed string remapping.
  Thanks ron@debian.org for noting this first. (Closes: #288669)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
#################################
 
4
# Set up Ethernet bridge on Linux
 
5
#################################
 
6
 
 
7
# Define Bridge Interface
 
8
br="br0"
 
9
 
 
10
# Define list of TAP interfaces to be bridged together
 
11
tap="tap0"
 
12
 
 
13
# Define physical ethernet interface to be bridged
 
14
# with TAP interface(s) above.
 
15
eth="eth0"
 
16
eth_ip="192.168.1.150"
 
17
eth_netmask="255.255.255.0"
 
18
eth_broadcast="192.168.1.255"
 
19
 
 
20
for t in $tap; do
 
21
    openvpn --mktun --dev $t
 
22
done
 
23
 
 
24
brctl addbr $br
 
25
brctl addif $br $eth
 
26
 
 
27
for t in $tap; do
 
28
    brctl addif $br $t
 
29
done
 
30
 
 
31
for t in $tap; do
 
32
    ifconfig $t 0.0.0.0 promisc up
 
33
done
 
34
 
 
35
ifconfig $eth 0.0.0.0 promisc up
 
36
 
 
37
ifconfig $br $eth_ip netmask $eth_netmask broadcast $eth_broadcast