PDA

View Full Version : bridging two interfaces in fc6


chintanraoh
2007-03-03, 07:39 AM CST
Hi ,
I recently started using FC6. It works fine I have a small problem in networking though.

I have two network cards corresponding to interfaces eth0 and eth1
The interface eth0 is connected to my external ADSL modem
This ADSL modem has ip 192.168.1.1 and serves as the gateway
The interface eth1 is connected to another computer .
Now i have to ensure that other computer gets internet connection along with this computer.
I know that we can use NAT or bridging to do this but could not figure how to do it .

Please help me out.

Thanking in advance
Chintan Rao H

Foster_ua
2007-03-03, 02:56 PM CST
echo 1 > /proc/sys/net/ipv4/ip_forward

iptables -t filter -P FORWARD DROP
iptables -t filter -A FORWARD -s $ip -j ACCEPT
iptables -t filter -A FORWARD -d $ip -j ACCEPT
iptables -t nat -A POSTROUTING -s $IP -j MASQUERADE
iptables -t nat -A POSTROUTING -d $IP -j MASQUERADE

chintanraoh
2007-03-03, 09:45 PM CST
echo 1 > /proc/sys/net/ipv4/ip_forward

iptables -t filter -P FORWARD DROP
iptables -t filter -A FORWARD -s $ip -j ACCEPT
iptables -t filter -A FORWARD -d $ip -j ACCEPT
iptables -t nat -A POSTROUTING -s $IP -j MASQUERADE
iptables -t nat -A POSTROUTING -d $IP -j MASQUERADE

Firstly, thanks for replying .
Can you tell me $ip or $IP should be

Chintan Rao H

Foster_ua
2007-03-04, 08:56 AM CST
$IP is an IP address of machine on network that should be connected through the gateway