repo.or.cz
/
tomato
/
davidwu.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Correct PPTP server firewall rules chain.
[tomato/davidwu.git]
/
release
/
src
/
router
/
bridge
/
tests
/
busybr
blob
bdaed46232d1011ae42cf70140f6fd0b43131885
1
#! /bin/sh
2
BR
=
${1:-"br549"}
3
ETH0
=
${1:-"eth0"}
4
ETH1
=
${1:-"eth1"}
5
6
# fetch ip of working br0
7
IP
=
`/sbin/ifconfig
$BR
| sed -n -e 's/^.*inet addr:\([0-9][0-9\.]*\).*$/\1/p'`
8
echo
"Using IP address
$IP
"
9
10
while
true
;
11
do
12
ifconfig
$BR
down
13
brctl delbr
$BR
14
ifconfig
$ETH0 $IP
15
16
ifconfig
$ETH0
0.0.0.0
17
brctl addbr
$BR
18
brctl addif
$BR $ETH0
19
brctl addif
$BR $ETH1
20
ifconfig
$BR $IP
21
22
sleep
10
23
done