Help - Search - Members - Calendar
Full Version: Suse 10.1 Internet connection sharing
Linuxhelp > Support > Technical Support
matt
Just wondering. I have a system hooked directly to the net running SUSE 10.1, My system has 2 nics with a crossover running to my roommates system. How do I share the connection?
Robert83
Hi,

sorry , I kinda overlooked this, so that is quiet simple, you only need to do the following actualy :

CODE
echo "1" > /proc/sys/net/ipv4/ip_forward


then you can put this somewhere where it will automaticaly launch , probably /etc/rc.d/rc.local

now try to ping external interface of the Suse machine , that should work, try to ping anything else no go, do this to make that happen .

You'll need to add this to POSTROUTING in order to transulate packets from internal lan to outside , and back.

CODE
iptables -t nat -A POSTROUTING -s 192.168.0.0/255.255.255.0 -o $EXTIF -j SNAT --to-source $EXTIP

$EXTIF = external interface
$EXTIP = external ip address

Hopefully you already have some sorta firewall rules in action. You can type both of these commands into the console as root, and the effect should be imediately available.

Then you config WinXP computer to use internap ip of your Suse computer as Gateway, and configure it to use ISP's DNS server. (no real point in making your own caching only dns server for 2 computers).

Hopefully this will help smile.gif

Sincerely
Robert B
matt
I found a temporary solution after. As my room mate just uses the net for browsing and etc I just installed the tinyproxy package for suse and added it to my rc.local. But thanks alot for the help, I'll note that for future reference. My linksys router acts as my firewall to the cable modem. I just didnt have a straight through long enough to reach his room or some rj45 heads to recrimp the crossover im using. But thanks for all the help!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.