Last active
January 4, 2016 01:49
-
-
Save hgn/8550815 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# aptitude install bridge-utils | |
if1=eth0 | |
if2=eth1 | |
ifconfig $if1 down | |
ifconfig $if2 down | |
ifconfig $if1 0.0.0.0 up | |
ifconfig $if2 0.0.0.0 up | |
# create bridge | |
brctl addbr br0 | |
brctl addif br0 $if1 | |
brctl addif br0 $if2 | |
echo 1 > /proc/sys/net/ipv4/conf/all/forwarding | |
echo 1 > /proc/sys/net/ipv6/conf/all/forwarding | |
brctl stp off | |
ifconfig br0 up | |
brctl show | |
# show learned mac addresses | |
brctl showmacs br0 | |
# information: | |
# http://people.debian.org/~ultrotter/talks/dc10/networking.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment