LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-28-2009, 06:46 AM   #1
zodehala
Member
 
Registered: Nov 2008
Posts: 53

Rep: Reputation: 15
i can not access via http (port 80)


i can not access via http (port 80) to centos 5.2 (but i can via SSH)

what is the problem ?
 
Old 02-28-2009, 06:49 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
what is the problem ?
Hard to say, are you connecting from the outsite, your lan, the server itself....
Some thoughts:
the service is not running (apache)
There is a firewall
...
 
Old 02-28-2009, 07:38 AM   #3
zodehala
Member
 
Registered: Nov 2008
Posts: 53

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by repo View Post
Hard to say, are you connecting from the outsite, your lan, the server itself....
Some thoughts:
the service is not running (apache)
There is a firewall
...
sorry

i can not connect from WAN and LAN

Code:
[root@localhost ~]# iptables -nvL
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination        
    0     0 ACCEPT     udp  --  virbr0 *       0.0.0.0/0            0.0.0.0/0           udp dpt:53
    0     0 ACCEPT     tcp  --  virbr0 *       0.0.0.0/0            0.0.0.0/0           tcp dpt:53
    0     0 ACCEPT     udp  --  virbr0 *       0.0.0.0/0            0.0.0.0/0           udp dpt:67
    0     0 ACCEPT     tcp  --  virbr0 *       0.0.0.0/0            0.0.0.0/0           tcp dpt:67
 2632 4147K RH-Firewall-1-INPUT  all  --  *      *       0.0.0.0/0            0.0.0.0/0          

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination        
    0     0 ACCEPT     all  --  *      virbr0  0.0.0.0/0            192.168.122.0/24    state RELATED,ESTABLISHED
    0     0 ACCEPT     all  --  virbr0 *       192.168.122.0/24     0.0.0.0/0          
    0     0 ACCEPT     all  --  virbr0 virbr0  0.0.0.0/0            0.0.0.0/0          
    0     0 REJECT     all  --  *      virbr0  0.0.0.0/0            0.0.0.0/0           reject-with icmp-port-unreachable
    0     0 REJECT     all  --  virbr0 *       0.0.0.0/0            0.0.0.0/0           reject-with icmp-port-unreachable
    0     0 RH-Firewall-1-INPUT  all  --  *      *       0.0.0.0/0            0.0.0.0/0          

Chain OUTPUT (policy ACCEPT 2561 packets, 4128K bytes)
 pkts bytes target     prot opt in     out     source               destination        

Chain RH-Firewall-1-INPUT (2 references)
 pkts bytes target     prot opt in     out     source               destination        
 2406 4108K ACCEPT     all  --  lo     *       0.0.0.0/0            0.0.0.0/0          
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           icmp type 255
    0     0 ACCEPT     esp  --  *      *       0.0.0.0/0            0.0.0.0/0          
    0     0 ACCEPT     ah   --  *      *       0.0.0.0/0            0.0.0.0/0          
   63 13708 ACCEPT     udp  --  *      *       0.0.0.0/0            224.0.0.251         udp dpt:5353
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0           udp dpt:631
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:631
   90 15389 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22
   73  9658 REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited
[root@localhost ~]#
 
Old 02-28-2009, 08:36 AM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
just open port 80 in your firewall like you did for 22 (SSH)
 
Old 02-28-2009, 01:03 PM   #5
zodehala
Member
 
Registered: Nov 2008
Posts: 53

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by repo View Post
just open port 80 in your firewall like you did for 22 (SSH)
already is it open as default ?

you mean following ?

Code:
#iptables -A INPUT -i eth0 -p tcp --sport 80 -m state --state ESTABLISHED -j ACCEPT
# service iptables restart
 
Old 02-28-2009, 02:32 PM   #6
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
#iptables -A INPUT -i eth0 -p tcp --sport 80 -m state --state ESTABLISHED -j ACCEPT
# service iptables restart
yes, also if you have a router, make sure port 80 is forwarded to the server
 
Old 03-02-2009, 06:25 AM   #7
zodehala
Member
 
Registered: Nov 2008
Posts: 53

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by repo View Post
yes, also if you have a router, make sure port 80 is forwarded to the server
still i can not access
 
Old 03-02-2009, 06:58 AM   #8
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
At the router, is port 80 forwarded to the server?
can you access your webserver from the box itself?
Code:
telnet 127.0.0.1 80
Are you trying to connect from a computer outside the network?
Does your provider allows traffic on port 80 ?
 
Old 03-02-2009, 08:28 AM   #9
zodehala
Member
 
Registered: Nov 2008
Posts: 53

Original Poster
Rep: Reputation: 15
thax for your help. i did it

System > Administration > Security Level And Firewall > Security Level > configuration > WWW(HTTP)
 
  


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
http port forwarding sanjibgupta Linux - Networking 2 04-27-2007 01:02 PM
Please help!!http port problem! kingisthebest Linux - Networking 8 03-01-2006 09:11 AM
turn off http port 80, keep https port 443 lothario Linux - Networking 6 02-11-2005 04:06 AM
HTTP port and Proxy port problem AZIMBD03 Linux - Networking 3 04-15-2004 09:20 PM
HTTP on port 8080 cauchy Linux - Networking 3 08-09-2001 07:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:16 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration