Click to See Complete Forum and Search --> : How to connect Linux to the Internet through a Firewall?


TPFH
09-12-2002, 04:34 AM
I'm wanting to settup a LAN so that I can have 2 machines on the net at the same time, and both connect through a firewall.

I have a cheap box running Coyote Linux as my firewall.
It is connecting to the internet with no problems.

My other 2 machines are my new box that is dual booting Linux and Win98, and my old box that is running Linux and Win95. I have all 3 machines connected through a switch.

Win98 connects to the internet with no problems. Linux on the new box was connecting to the internet when I first installed it but not anymore. I'm running Mandrake 8.2 on the new box.

On the old box Win95 has connected through the firewall, but not always. I have Mandrake 7.2 running on the old box. (I just recently wiped the drive and re-installed Mandrake 7.2 after upgrading it to 8.2 and finding it too slow for the old hardware.) Previously it was connecting to the internet using DHCP (Connected directly to the "DSL Modem"), but it would not connect to the firewall using DHCP.

I need some basic information on how to settup a network on Linux. I tried the NHF and the book Running Linux but both only tell you how to settup Linux as a firewall, not how to connect to a firewall. And I've tried the configuration tools and they are not helping.

Is there something I need to put in /etc/hosts or /etc/resolv.conf ?
Are there any other network configuration files in Linux?
How do I tell it to connect using 192.168.0.1?

I can ping 192.168.0.1 but not the IPs of my ISPs nameservers. I have the other IPs set in 192.168.0.*

BaudBandit
09-12-2002, 07:13 AM
If you have webmin installed as well as iptables this webmin module makes it easy to setup iptables and its easy to understand http://freshmeat.net/projects/iptables_webminmodule/?topic_id=43%2C136

http://www.niemueller.de/webmin/modules/iptables/

TPFH
09-12-2002, 10:59 PM
OK, I took a look at Essential System Administration at work and got some more ideas.

Oh, also, I tried pinging my ISP's nameservers and I was hitting them, just very badly. I'm also getting bad response from my firewall, around 84% packet loss.

I had thought my NIC was 10/100 but maybe it is just 10 and my firewall is 100, or otherwise I need to get a new NIC for my old box.

I looked at the configuration on my new box again.
I created a file /etc/gateways with the IP for my firewall.
And I added the IPs for my ISPs nameservers into resolv.conf

Now my network is working OK in Linux on my new box.

Does it sound like the main problem now with my old box is my NIC?

neondog
09-14-2002, 09:00 AM
Are you trying to route those two machines out to the internet via a Linux box? If so you will need to use iptables and ip masquerading in specific. check out www.netfilter.org for info on how to do this.

jumpedintothefire
09-14-2002, 11:44 AM
Oh, also, I tried pinging my ISP's nameservers and I was hitting them, just very badly. I'm also getting bad response from my firewall, around 84% packet loss.

Does it sound like the main problem now with my old box is my NIC?

>> YES, or a bad cable....