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
/
mkbr
blob
1d64e82eae2d82614a37976566498caa2744fc51
1
#! /bin/sh
2
3
BR
=
${1:-"br549"}
4
ETH
=
${2:-"eth0"}
5
6
# fetch ip of working eth0
7
IP
=
`/sbin/ifconfig
$ETH
| sed -n -e 's/^.*inet addr:\([0-9][0-9\.]*\).*$/\1/p'`
8
echo
"Using IP address
$IP
"
9
10
ifconfig
$ETH
0.0.0.0
11
brctl addbr
$BR
12
brctl addif
$BR $ETH
13
ifconfig
$BR $IP