LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   IPTABLES problem (https://www.linuxquestions.org/questions/linux-networking-3/iptables-problem-42559/)

Javier 01-23-2003 08:08 PM

IPTABLES problem
 
:Pengy: Hello to everyone. I guess you all know I am here because I need help. Here is the lowdown. I have a DSL connection to the internet. I share the internet to two computers using a Linksys router. Pc number one is running Windows 98SE.
Pc number two is a dual boot box. It runs Windows 98SE and Red Hat 8.0.

Here is my problem, when I boot into Linux, I am able to ping any web site with no problems, however I cannot surf the internet. When I try to surf, my requests just time out after several minutes. Using "lokkit" I can see that the firewall is set to "high". When I try to change it to "medium", the iptables file does not get saved with my changes. I have even tried shutting down the firewall for testing purposes. I can not surf the internet even with the firewall down. I am able to receive my mail using Mozilla.

KevinJ 01-23-2003 08:20 PM

Well, I wouldn't run a firewall on it while you test this. Your Linksys router should have a firewall on it, so I don't see why you would need one on the Linux box.

service iptables stop

should turn it off completely I think.

You say you can ping websites.... do you mean the hostname or the IP address?

What does your /etc/resolv.conf have in it?

-Kevin

Javier 01-23-2003 08:50 PM

Here are the answers to your questions.

I did stop the iptables. I went to "/etc/rc.d/rc5.d" and I issued a
"iptables stop".

I can ping the web sites by both hostname and IP address.

As for the contents of the "/etc/resolv.conf", it has two entries. This are the contents:
nameserver 206.141.192.60
nameserver 206.141.192.55

Those are the IP addresses were the ones provided by my ISP.

TIA

Javier

KevinJ 01-23-2003 09:05 PM

well... I don't think that works, at least not like you typed it. Like I said.. try "service iptables stop"

-Kevin

Javier 01-23-2003 09:15 PM

Sorry, I should have written down the correct sintax. However, I did shutdown the service. I have done it both ways, by using the "Service" button and selecting iptables and pressing the "stop" button as well as by going to the "rc.5" subdirectory and issuing the stop command. I am currently on the dual boot box under Windows.

pilot1 01-24-2003 07:58 AM

I had this same problem, in my case it was that the gateway wasn't set. Type "netconfig" and then just go through the screens and make sure to set the default gateway to your routers IP, also it would be a good idea to have iptables turned off while you run netconfig and test is.

Javier 01-24-2003 08:55 AM

Thanks for your suggestion. I tried it however it did not solve my problem. The request comes back after several minutes with the
"The document contains no data" response.
When I went through the "netconfig", I tried both giving it a static IP address and switching to dhcp. While I ran the tests, the firewall was down. I went to "/etc/rc.d/rc5.d" and executed:
"./Sxxiptables stop" where xx is the number given to the link file.

KevinJ 01-24-2003 09:43 AM

Okay.. so you have a good network connection but you can't get HTTP?? That has to be either firewall or browser settings.

Any chance the cable/dsl router is filtering your IP address?

Can you try a different browser... like "links" or "lynx"?

Try this....

chkconfig --level 2345 iptables off

then reboot.

I know you are frustrated by this, but we are missing a piece of the puzzle.

-Kevin

Javier 01-24-2003 11:00 AM

I ran all of the different versions of "chkconfig" you suggested. None of them returned any value. I did reboot after that. I then tried to access the web using mozilla, no go. I am able to use "gftp" to download/upload files to the web. I will try to down load "netscape" and try it.

Thanks
Javier

KevinJ 01-24-2003 11:04 AM

You don't have "lynx" or "links"? Those are great for troubleshooting something like this.

-KevinJ

Javier 01-24-2003 11:10 AM

No I don't have either one of them. Are they part of Red Hat 8.0?

KevinJ 01-24-2003 11:20 AM

yes... they are both text based HTML browsers.... You can't do a whole lot with them other than troubleshoot because of all the complicated websites people put up today, but they are very good for troubleshooting.

-KevinJ

Darin 01-24-2003 11:36 AM

lynx http://www.slackware.com

Perfect for testing and the site was made to look readable under lynx as well as internet exploder or netscrape.

A couple other things...

I think you need the NAT part of your firewall on to surf so you may not want to turn it off.

If you can ping an internet name like www.3com.com but a web browser doesn't work then that usually ends up being someone put proxy settings in the web browser which need to be taken out.

You can use the text ftp client instead of lynx to troubleshoot also, try "ftp ftp.cdrom.com" and see if it works.

Javier 01-24-2003 12:01 PM

I installed lynx off the Red Hat installation cd. I then executed the following:
lynx www.google.com
Looking up www.google.com
Making HTTP connection to www.google.com
Seding HTTP request
HTTP request sent: waiting for response
Alert: Unexpected network read error: connection aborted
Cant access www.google.com'
Alert: Unable to access document.

I also tried to do a command line ftp to the ftp.cdrom.com.
I connected with no problems. I then checked the proxie section of mozilla. It is set to connect directly to the internet.

Thanks

Darin 01-24-2003 12:13 PM

This is progress, you can ftp but not http that tells something.

You're IP addresses and related settings like DNS and gateway are probably all set fine. You could even see if the other machine can also FTP, you can type ftp.cdrom.com in a web browser and see if that works.

I've never had a problem like that but my guess would be that you have some rules in your firewall that block http (www sites) from working properly. The fix would be to go through the settings in your firewall, some RH or "lokkit" guru will have to help with suggestions for that.


All times are GMT -5. The time now is 12:23 AM.