Jump to content
Compatible Support Forums
Sign in to follow this  
jarves

internet sharing

Recommended Posts

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. smile

 

 

tnx

Share this post


Link to post

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.

Share this post


Link to post

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[/font] - to 2nd computer, IP 192.168.0.1

[font:Courier]eth1[/font] - 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 [/font]

(or permanently, add this line to [font:Courier]/etc/rc.d/rc.local[/font]

OR set it in [font:Courier]/etc/sysctl.conf[/font] (esp. in RH/Fedora))

 

[font:Courier]/sbin/iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE[/font]

 

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

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×