internet sharing

hello, how can i configure my linux to share internet. my computer that has an internet has lancards on it. i do not hav a router or any device other than the lancard. im using fedora core 4. in windows it is easy to share internet connection, is it also easy on linux??? maybe someone can point me to some tutorials ...

Everything Linux 1798 This topic was started by ,


data/avatar/default/avatar26.webp

151 Posts
Location -
Joined 2003-12-23
hello, how can i configure my linux to share internet. my computer that has an internet has lancards on it. i do not hav a router or any device other than the lancard. im using fedora core 4. in windows it is easy to share internet connection, is it also easy on linux??? maybe someone can point me to some tutorials on it.
 
 
tnx

Participate on our website and join the conversation

You have already an account on our website? Use the link below to login.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


data/avatar/default/avatar10.webp

2895 Posts
Location -
Joined 2002-08-30
Is this dialup, cable or DSL?
 
How many machines are you looking to set up?
 
If you have a cable or DSL connection, how many ethernet ports are on the modem?
 
If you have cable, does the ISP assign addresses statically or dynamically?
 
Knowing youe specific needs will help answer your question.

data/avatar/default/avatar11.webp

1 Posts
Location -
Joined 2005-12-06
I expect you have ONE PC with TWO ethernet cards(interfaces). One goes to the other computer and one goes to the Internet.
 
Example situation:
[font:Courier]eth0 - to 2nd computer, IP 192.168.0.1
[font:Courier]eth1 - to Internet, IP 10.64.1.99
 
Let's do this on the computer in console (as root):
[font:Courier] echo "1" > /proc/sys/net/ipv4/ip_forward
(or permanently, add this line to [font:Courier]/etc/rc.d/rc.local
OR set it in [font:Courier]/etc/sysctl.conf (esp. in RH/Fedora))
 
[font:Courier]/sbin/iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
 
Then, on the 2nd computer, you have to:
- set default gateway to 192.168.0.1
- set up the same DNS servers as on the 1st computer
You may enter fixed IP as well (eg. 192.168.0.2) or keep it on DHCP.
 
I have just set up this succesfully. If I didn't write something clear, you may ask me at: brozkeff-AT-gmail-DOT-com
 
_____________
Brozkeff