Computing.Net > Forums > Linux > Linux as a router

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Linux as a router

Reply to Message Icon

Name: David Ramsbottom
Date: October 22, 2003 at 04:16:06 Pacific
OS: n/a
CPU/Ram: P266 / 64mb
Comment:

Hi, I have an old box which I want to use to route a dial-up 56k internet connection to an internal (192.168.x.x) network, of about 3 or 4 PCs. I am currently running Windows 2k AS on the server box, and Kerio WinRoute as the routing program. The system is a bit underpowered and the system crashes after a few hours of uptime (ie you cannot use the routing facilities, or connect to the FTP server. However you can still ping it... :/ ). Apart from these problems it works OK.
I would like to try using Linux as a similar setup. I understand that I would have to use IP Forwarding etc, but I am unsure exactly what to do. Can anyone suggest what I should do and what distro I should use..

Thanks,

David



Sponsored Link
Ads by Google

Response Number 1
Name: 3Dave
Date: October 22, 2003 at 08:32:49 Pacific
Reply:

You should be able to use just about any
distro as they all seem to support IP
tables (or the older IP chains). You want
to look at IP Masquerading, pop onto
ww.tldp.org and read the HOWTO on it.

Alternatively you could use a smaller
floppy based distro (like FreeSCO) which is
a proxy, gateway etc all rolled into one,
and you just need to boot the floppy, no
need to install it!


0

Response Number 2
Name: Jake
Date: October 22, 2003 at 09:08:03 Pacific
Reply:

Another good OS for routers is OpenBSD. They have so much information in their "FAQs," most are more like step-by-step guides (including networking, firewall, NAT, port forwarding, etc.). Also, I like the firewall rule syntax more than iptables in Linux. It just seems more intuitive. I don't know about modem support in OpenBSD, but it's great as a router, and it's one of the most secure OSs available.


0

Response Number 3
Name: C_Legend
Date: October 22, 2003 at 21:53:41 Pacific
Reply:

Well, I do this with Redhat 8, but should work with most 2.4 kernel-based distros. All I had to do was get my dial-up connection working (as well as my networking), then, at a command prompt enter these 3 lines:

# modprobe iptable_nat
# iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
# echo 1 > /proc/sys/net/ipv4/ip_forward

(the 2nd line may be wrapping)

I have done this (IP masquerading, or NAT) on the 2.0 and 2.2 kernels, as well, if you'd like to use an older distro, but with your specs (PII 266 and 64 Meg of RAM), you should be able to roll on Redhat 8 (or whatever, although for a server installation such as yours, I wouldn't recommend Mandrake) and use this as a router.

With the 3 lines noted above, I put them in a file (made it executable...chmod +x filename), and then inserted that filename (ie /bin/ipmasq) at the bottom of the /etc/rc.d/rc.local file so I don't have to enter these lines everytime (the IP masquerading is then set up upon boot). If you decide to use something other than Redhat, the placement of the 3-line file in /etc/rc.d/rc.local may not be directly portable and may need to be placed elsewhere. Good luck.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: Linux as a router

Linux as a router