> I want my LAN to have access to the internet through a LINUX server.
> I've been searching for days, literally, and I cannot find a simple
> answer to my question. I feel really stupid and vulnerable asking
> because I've heard horror stories about how impatient LINUX people
> get when they have to deal with someone that doesn't already know
> lots and lots about the system, but here goes.
> What do I need to forward TCP/IP traffic from one ethernet card on a
> LINUX server to another?
> eg: cable modem -->ethernet0 on LINUX route to ethernet1 on LINUX
> --> LAN
> I already have two cards and a simple routing table. The LAN can
> ping BOTH ethernet cards on the server but we can't get to the
> internet! The LINUX server can reach the internet just fine. What do
> I need to do to get ethernet0 and ethernet1 to transmit packets back
> and forth?
I assume, that because it's a cable modem, you only have one IP address.
In your current setup, the computers trying to access the Internet are
using private IP's (not routable on the Internet) rather than routable IP's.
Because of this, you'll either have to use a proxy server like dante
(SOCKS), or squid (HTTP). SOCKS proxies are the best solution for the
applications that support it, like some internet instant messaging
programs, internet phones, and streaming media.
For web browsing, a HTTP proxy like squid is a better solution for web
browsing. Running squid will improve your web speed, as the most often used
web pages are "cached" by the proxy server, so that popular web pages don't
need to be got from the internet every time.
Often though, there are applications which work neither with HTTP proxies
nor SOCKS proxies. Then it's good to set up IP masquerading as well. IP
masquerading takes outgoing internet traffic, and changes the IP address to
it's own IP address, thereby enabling communication. This works with many
applications without special setup, but some do get problems, especially
those requiring bidirectional communication, like servers and internet
phones.
You may also want to set up a caching DNS server to lessen the outbound
load for DNS. This will also improve performance significantly.
Here are some helpful addresses:
Google, a great general search engine
http://www.google.com/
The Linux IP Masquerade HOWTO
http://www.linuxdoc.org/HOWTO/IP-Masquerade-HOWTO.html
Information about the dante SOCKS proxy
http://www.inet.no/dante/
Information about squid, a caching HTTP proxy
http://www.squid-cache.org/
The Linux DNS HOWTO
http://www.linuxdoc.org/HOWTO/DNS-HOWTO.html
Good luck and have a nice day :)
--