LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 06-20-2005, 01:29 PM   #1
helpme0904
Member
 
Registered: Sep 2004
Posts: 45

Rep: Reputation: 15
client cannot connect to server via http


I have firewall that only has http traffic. I can connect to the server locally but when I go to antoher pc to connect it will not find server. I can access out onto the internet from the server and I can ping the computer and get a response from the client pc. What can I check to see what the issue is.

 
Old 06-20-2005, 04:28 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,536

Rep: Reputation: 148Reputation: 148
From a remote machine try
telnet server_ip_address 80
If you get 'Connection refused' it's your firewall or server configuration (the default is to accept connections from outside, however). My first guess would be to look at the firewall. Please post 'iptables -L' result.
 
Old 06-23-2005, 09:48 AM   #3
helpme0904
Member
 
Registered: Sep 2004
Posts: 45

Original Poster
Rep: Reputation: 15
Here is the output for my iptables. I can ping to computer but unable to connect to browser locally or from another computer.


when I type this (iptables -L) at command line I recieve the following:

Chain INPUT (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- anywhere anywhere
ACCEPT udp -- anywhere anywhere udp spt:domain dpts :1024:65535
ACCEPT tcp -- anywhere anywhere tcp spts:1024:65535 dpt:http state NEW
ACCEPT tcp -- anywhere anywhere tcp spts:1024:65535 dpt:http state NEW

Chain FORWARD (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- anywhere anywhere

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT udp -- anyUntitled 1where anywhere udp spts:1024:65535 dpt:domain
ACCEPT all -- anywhere anywhere state RELATED,ESTAB LISHED

Chain RH-Firewall-1-INPUT (2 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere icmp any
ACCEPT ipv6-crypt-- anywhere anywhere
ACCEPT ipv6-auth-- anywhere anywhere
ACCEPT all -- anywhere anywhere state RELATED,ESTAB LISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:http state NEW
REJECT all -- anywhere anywhere reject-with icmp-ho st-prohibited


Also, when I type this (more /etc/sysconfig/iptables) at command line I recieve the following:

# Generated by iptables-save v1.2.9 on Thu Jun 23 10:31:41 2005
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [383:66745]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A INPUT -i eth0 -p udp -m udp --sport 53 --dport 1024:65535 -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --sport 1024:65535 --dport 80 -m state --state NEW -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --sport 1024:65535 --dport 80 -m state --state NEW -j ACCEPT
-A FORWARD -j RH-Firewall-1-INPUT
-A OUTPUT -o eth0 -p udp -m udp --sport 1024:65535 --dport 53 -j ACCEPT
-A OUTPUT -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp -m icmp --icmp-type 255 -j ACCEPT
-A RH-Firewall-1-INPUT -p esp -j ACCEPT
-A RH-Firewall-1-INPUT -p ah -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited


Please Help
 
Old 06-23-2005, 10:19 AM   #4
helpme0904
Member
 
Registered: Sep 2004
Posts: 45

Original Poster
Rep: Reputation: 15
I also recieved this error messgage when I try to restart/start my httpd server.

httpd failed. The error was: Starting httpd: (98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
no listening sockets available, shutting down
Unable to open logs
[FAILED]


 
Old 06-24-2005, 04:33 PM   #5
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,536

Rep: Reputation: 148Reputation: 148
It looks like it's rather something wrong with httpd. It stops, so you can't connect. First check what's using port 443. Run
netstat -l -p -n
and browse the list searching for something:443 in the 4th column. What can you see?
 
Old 06-27-2005, 09:37 AM   #6
helpme0904
Member
 
Registered: Sep 2004
Posts: 45

Original Poster
Rep: Reputation: 15
I changed the listen port from 80 to 88 and 443 to 448 and I was able to connect to webserver. I ran nmap and it shows that port 80, 53 and 443 tcp closed. How do I open these ports? Above is my iptables, is there any thing else that will cause it to be closed?

Please Help
 
Old 06-29-2005, 02:50 PM   #7
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,536

Rep: Reputation: 148Reputation: 148
Ports are open when a program is listening on them. In your case (the error you get) they seem to be closed, but still used at the same time. Switch back to standard port, try to run it, see if you get the error again and then browse netstst -l -n -p list. There should be a program using port 443. Which one?
 
Old 07-07-2005, 08:58 AM   #8
helpme0904
Member
 
Registered: Sep 2004
Posts: 45

Original Poster
Rep: Reputation: 15
working now

I made a few changes in iptables. working now!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot connect to Samba server from Win2k client buddhahat Linux - Networking 11 06-20-2005 03:01 PM
can not connect to my pureftp server from Linux client, but i can from windows client bonito Suse/Novell 5 03-16-2005 09:45 PM
Client wont connect to server odd Linux - Software 0 06-04-2004 04:49 PM
uunable to connect http other then port 80 using proxy server askjha Linux - Networking 1 06-03-2004 01:38 PM
can't connect to linux server using X client netkepala Linux - Networking 7 01-06-2003 01:48 AM


All times are GMT -5. The time now is 01:33 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration