Mandriva Bridging


# Ethernet device wakeup
echo “Ethernet Adaptor Wakeup Call…”
ifconfig eth0 up
ifconfig eth1 up
#ifconfig eth2 up

# Create the bridge
echo “Ethernet Bridge Configuration Loading…”
brctl addbr br1

# Add The Interfaces
brctl addif br1 eth0
brctl addif br1 eth1
#brctl addif br1 eth2

# Turn The Bridge On
echo “Bridge Configuration Done…”
ifconfig br1 up

# Give br0 And Address
# Don’t forget to configure this
ifconfig br1 222.124.30.82

# EBTables Configuration
ebtables -t nat -A PREROUTING -p ipv4 –ip-proto tcp –ip-dport 80 -j redirect –redirect-target ACCEPT

# IPTables Configuration
# Private Network Traffic Source Is Accepted
iptables -A FORWARD -s 10.0.0.0/8 -j ACCEPT
iptables -A FORWARD -s 172.16.0.0/12 -j ACCEPT
iptables -A FORWARD -s 192.168.0.0/16 -j ACCEPT
iptables -A FORWARD -s 222.124.30.80/29 -j ACCEPT
iptables -A FORWARD -m state –state ESTABLISHED,RELATED -j ACCEPT

# IPTables Redirection
iptables -t nat -A PREROUTING -p tcp –dport 80 -j REDIRECT –to-ports 3128

iptables -A INPUT -j ACCEPT
iptables -A OUTPUT -j ACCEPT

# Routing setup
route add default gw 222.124.30.81 dev br1

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: