Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm installing a small server on the company where I work. I go to whatsmyip.org and it tells me it is 190.124.165.35. When I go to canyouseeme.org it tells me that the connection timed out for port 80.

I already disabled ufw.

The scenario inside my company is this one:

I have this pc with Ubuntu 14.04 and I finished installing LAMP on it. This computer doesn't have the actual IP address. The IP address of this computer is an internal IP address from the company.

My boss uses watchguard firewall and he did some rerouting so that when you enter 190.124.165.35 to your browser, it redirects you to the internal IP assigned to this computer and you can view the web app.

Is there any extra configuration I need to do on the server to be able to view this?

EDIT

Running netstat -nlt provides the following:

netstat -nlt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN     
tcp        0      0 127.0.1.1:53            0.0.0.0:*               LISTEN     
tcp6       0      0 ::1:631                 :::*                    LISTEN     
tcp6       0      0 :::80                   :::*                    LISTEN 

2 edit

Running netstat -anp | grep :80 provides:

tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      19901/apache2   
tcp        1      0 192.168.0.50:59468      198.252.206.16:80       CLOSE_WAIT  13586/python    
tcp        0      0 127.0.0.1:80            127.0.0.1:54941         TIME_WAIT   -               
tcp      116      0 192.168.0.50:45854      198.252.206.25:80       ESTABLISHED 2068/firefox    
tcp        0      0 127.0.0.1:80            127.0.0.1:54943         TIME_WAIT   -               
tcp        1      0 192.168.0.50:43087      91.189.89.31:80         CLOSE_WAIT  12740/gvfsd-http
tcp        1      0 192.168.0.50:42810      91.189.89.31:80         CLOSE_WAIT  12740/gvfsd-http
tcp        0      0 127.0.0.1:80            127.0.0.1:54944         TIME_WAIT   -               
tcp        0      0 127.0.0.1:80            127.0.0.1:54942         TIME_WAIT   -               
tcp        1      0 192.168.0.50:35928      91.189.89.144:80        CLOSE_WAIT  12710/ubuntu-geoip-

result for ip tables

Chain INPUT (policy ACCEPT 152K packets, 170M bytes)
 pkts bytes target     prot opt in     out     source               destination         
 152K  170M ufw-before-logging-input  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
 152K  170M ufw-before-input  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
 152K  170M ufw-after-input  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
 152K  170M ufw-after-logging-input  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
 152K  170M ufw-reject-input  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
 152K  170M ufw-track-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 ufw-before-logging-forward  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 ufw-before-forward  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 ufw-after-forward  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 ufw-after-logging-forward  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 ufw-reject-forward  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 ufw-track-forward  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain OUTPUT (policy ACCEPT 106K packets, 17M bytes)
 pkts bytes target     prot opt in     out     source               destination         
 107K   17M ufw-before-logging-output  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
 107K   17M ufw-before-output  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
 106K   17M ufw-after-output  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
 106K   17M ufw-after-logging-output  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
 106K   17M ufw-reject-output  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
 106K   17M ufw-track-output  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain ufw-after-forward (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-after-input (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-after-logging-forward (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-after-logging-input (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-after-logging-output (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-after-output (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-before-forward (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-before-input (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-before-logging-forward (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-before-logging-input (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-before-logging-output (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-before-output (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-reject-forward (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-reject-input (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-reject-output (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-track-forward (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-track-input (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-track-output (1 references)
 pkts bytes target     prot opt in     out     source               destination         
share|improve this question
    
Have you started Apache? –  John Aug 4 at 17:41
    
Apache is already running. I can view the default page of apache when I go to localhost. –  hsoto Aug 4 at 17:42
    
Have you tried to view a web page from another computer behind the firewall? –  John Aug 4 at 17:43
1  
Use netstat -aon and check the apache process has been bound for the port 80 to a valid IP or 0.0.0.0, and not to just a loopback (127.0.0.1 or ::1) –  Marcelo Aug 4 at 17:48
    
THe list is either to large and I can't see apache listed or it is definitely not in that list. However, check my updated question to see something curious. –  hsoto Aug 4 at 17:59

3 Answers 3

A connection timeout indicates that you're being filtered. However according to your iptables configuration the default policy is set to ACCEPT, so you should be fine.

Please try telnet <internal> 80 from

  1. localhost
  2. a host in the local network

If both of these work (they should), you're fine. Go back to your boss and tell him to reconfigure the firewall.

share|improve this answer

If you went to whatismyip.com - you probably passed thru your corporate firewall and every machine in your office has the same ip address. You'll never be able to access that website from outside without re-configuring your firewall.

Instead, find your internal IP address (192.168.what.ever) and try going to that IP address http://192.168.what.ever in your browser.

share|improve this answer

Seems that your Apache Server is listening on IPV6 only.

I would suggest to modify your server config to listen on IPV4 by changing the Listen directive from :

Listen 80

to

Listen 0.0.0.0:80

Edit 1 :

So now your Web Server is listening correctly where it should.

Some more analysis made in Chat (like Nmap and tcpdump) clearly show that you have a Firewall issue. Your boss didn't do the right job. As you told me "he has something to fix"...let's wait !

share|improve this answer
    
How can I do that? I'm not really very experienced configuring servers –  hsoto Aug 4 at 18:07
    
Have a look in file /etc/apache2/ports.conf –  krisFR Aug 4 at 18:08
    
Done! Changed it already. Still, when I go back to canyouseeme.org it says Error: I could not see your service on 190.124.165.35 on port (80) Reason: Connection timed out. –  hsoto Aug 4 at 18:11
    
Have you restarted Apache to apply changes ? –  krisFR Aug 4 at 18:12
    
The following appears: sudo service apache2 restart * Restarting web server apache2 AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message –  hsoto Aug 4 at 18:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.