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 ...
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
tnx
Participate on our website and join the conversation
This topic is archived. New comments cannot be posted and votes cannot be cast.
Responses to this topic
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
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