On Wed, Apr 11, 2001 at 09:30:56PM +0800, Dennis wrote:
Now I got my ADSL up and running, next thing is to think about how to share the connection. : )
Can someone help me on this by giving me some one or two lines command to set it up? security is not a big concern now but I need it to work before I can find sometime to got the Linksys router.
echo "1" /proc/sys/net/ipv4/ip_forward
will set up forwarding on your 'net connected box.
Next you'll have to set up masquerading. If you have a 2.2.x kernel, or a 2.4
kernel with ipchains support, use this command:
ipchains -P forward MASQ
If you use a 2.4 kernel without ipchains support, then you'll need to use the
'iptables' command, but I'm not too hot on iptables at the moment, so I
couldn't tell you exactly what to use.
Also note that this leaves you with no firewall protection at all. Use a SuSE
supplied package, or check out http://netfilter.kernel.org to do this.
Finally, you'll need to set you second computer to point to the 'net connected
one as its gateway. Use this command:
route add default gw