View Full Version : Internet Connection Sharing
king sabri
2007-12-27, 01:05 PM CST
hey all
I've 2 Network card in my PC I want to share the inter net from eth0 to eth1
how I can do that in fedora 7 or 8
sorry about my weakness my language
-----------------------------------------
Any One Can help me As frind ?
king-sabrii@hotmail.com
nikosapi
2007-12-27, 02:40 PM CST
You can do this quite easily using brctl from the bridge-utils package.
You can do it like so:
# give your network interfaces IP addresses
ifconfig eth0 x.x.x.x
ifconfig eth1 x.x.x.y
brctl addbr br0
brctl addif br0 eth0
brctl addif br0 eth1
ifconfig br0 upYou can also let the bridge interface have it's own IP address using dhcp, etc.
There's a lot of info about bridging under Linux on this page: http://www.linux-foundation.org/en/Net:Bridge
king sabri
2007-12-28, 05:15 AM CST
oooh
thanks my frinds
thanks so mutch
stevea
2007-12-28, 05:25 AM CST
That only adds both interfaces to a virtual hub.
It does NOT forward traffic, it does NOT allow each interface collect packets for the opposite side. It does not provide NAT service for the local LAN (eth1) side.
You need to set packet forwarding in sysctl and you need to add several iptables entries to NAT and accept traffic. I believe you are trying to use the system as a gateway to the Internet. Sorry - I don't have the magical incantation off the top of my head.
king sabri
2007-12-28, 05:32 AM CST
sorry my frind
I've another question
naw I've one Network Card conneted to NAT(DSL router (have dhcp )
that mean in want to configuer eth1 only
I'm update the brudg utile successfully but I can not find it
nikosapi
2007-12-28, 05:51 AM CST
"yum info bridge-utils" Shows that on Fedora 7/8, bridge-utils is part of the fedora repo...
You should be able to install it with: su -c "yum install bridge-utils"
If you meant that you installed it but could not find brctl, it's probably because it gets installed to /usr/sbin, so to execute it you need to do: /usr/sbin/brctl
king sabri
2007-12-31, 02:37 PM CST
my frind i'm executer the brctl .
# give your network interfaces IP addresses
ifconfig eth0 x.x.x.x
ifconfig eth1 x.x.x.y
brctl addbr br0
brctl addif br0 eth0
brctl addif br0 eth1
ifconfig br0 up
I'm try this method but it does not work
are you have another method pleas ?
stevea
pleas I'm very beginner in linux
can you give mor explanations ?
thankx for all about your time
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.