Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

My Linux machine is inaccessible by the IP address, as in only

    http://127.0.0.1:8080/projectname

or localhost works on the browser, but

    http://10.1.5.5:8080/projectname

doess not (here 10.1.5.5 is my IP address as found out by typing ifconfig in terminal).

I am using Fedora 16.

Edit: output of iptables -L -n:

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
INPUT_direct  all  --  0.0.0.0/0            0.0.0.0/0           
INPUT_ZONES  all  --  0.0.0.0/0            0.0.0.0/0           
ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           
REJECT     all  --  0.0.0.0/0            0.0.0.0/0            reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
FORWARD_direct  all  --  0.0.0.0/0            0.0.0.0/0           
FORWARD_ZONES  all  --  0.0.0.0/0            0.0.0.0/0           
ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           
REJECT     all  --  0.0.0.0/0            0.0.0.0/0            reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
OUTPUT_direct  all  --  0.0.0.0/0            0.0.0.0/0           

Chain FORWARD_ZONES (1 references)
target     prot opt source               destination         
FWDO_ZONE_public  all  --  0.0.0.0/0            0.0.0.0/0           
FWDI_ZONE_public  all  --  0.0.0.0/0            0.0.0.0/0           

Chain FORWARD_direct (1 references)
target     prot opt source               destination         

Chain FWDI_ZONE_public (1 references)
target     prot opt source               destination         
FWDI_ZONE_public_deny  all  --  0.0.0.0/0            0.0.0.0/0           
FWDI_ZONE_public_allow  all  --  0.0.0.0/0            0.0.0.0/0           

Chain FWDI_ZONE_public_allow (1 references)
target     prot opt source               destination         

Chain FWDI_ZONE_public_deny (1 references)
target     prot opt source               destination         

Chain FWDO_ZONE_external (0 references)
target     prot opt source               destination         
FWDO_ZONE_external_deny  all  --  0.0.0.0/0            0.0.0.0/0           
FWDO_ZONE_external_allow  all  --  0.0.0.0/0            0.0.0.0/0           

Chain FWDO_ZONE_external_allow (1 references)
target     prot opt source               destination         
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           

Chain FWDO_ZONE_external_deny (1 references)
target     prot opt source               destination         

Chain FWDO_ZONE_public (1 references)
target     prot opt source               destination         
FWDO_ZONE_public_deny  all  --  0.0.0.0/0            0.0.0.0/0           
FWDO_ZONE_public_allow  all  --  0.0.0.0/0            0.0.0.0/0           

Chain FWDO_ZONE_public_allow (1 references)
target     prot opt source               destination         

Chain FWDO_ZONE_public_deny (1 references)
target     prot opt source               destination         

Chain INPUT_ZONES (1 references)
target     prot opt source               destination         
IN_ZONE_public  all  --  0.0.0.0/0            0.0.0.0/0           

Chain INPUT_direct (1 references)
target     prot opt source               destination         

Chain IN_ZONE_dmz (0 references)
target     prot opt source               destination         
IN_ZONE_dmz_deny  all  --  0.0.0.0/0            0.0.0.0/0           
IN_ZONE_dmz_allow  all  --  0.0.0.0/0            0.0.0.0/0           

Chain IN_ZONE_dmz_allow (1 references)
target     prot opt source               destination         
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:22 ctstate NEW

Chain IN_ZONE_dmz_deny (1 references)
target     prot opt source               destination         

Chain IN_ZONE_external (0 references)
target     prot opt source               destination         
IN_ZONE_external_deny  all  --  0.0.0.0/0            0.0.0.0/0           
IN_ZONE_external_allow  all  --  0.0.0.0/0            0.0.0.0/0           

Chain IN_ZONE_external_allow (1 references)
target     prot opt source               destination         
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:22 ctstate NEW
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:80 ctstate NEW
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:8080 ctstate NEW

Chain IN_ZONE_external_deny (1 references)
target     prot opt source               destination         

Chain IN_ZONE_home (0 references)
target     prot opt source               destination         
IN_ZONE_home_deny  all  --  0.0.0.0/0            0.0.0.0/0           
IN_ZONE_home_allow  all  --  0.0.0.0/0            0.0.0.0/0           

Chain IN_ZONE_home_allow (1 references)
target     prot opt source               destination         
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:22 ctstate NEW
ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:631 ctstate NEW
ACCEPT     udp  --  0.0.0.0/0            224.0.0.251          udp dpt:5353 ctstate NEW
ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:137 ctstate NEW
ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:138 ctstate NEW
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:8080 ctstate NEW
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:80 ctstate NEW

Chain IN_ZONE_home_deny (1 references)
target     prot opt source               destination         

Chain IN_ZONE_internal (0 references)
target     prot opt source               destination         
IN_ZONE_internal_deny  all  --  0.0.0.0/0            0.0.0.0/0           
IN_ZONE_internal_allow  all  --  0.0.0.0/0            0.0.0.0/0           

Chain IN_ZONE_internal_allow (1 references)
target     prot opt source               destination         
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:22 ctstate NEW
ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:631 ctstate NEW
ACCEPT     udp  --  0.0.0.0/0            224.0.0.251          udp dpt:5353 ctstate NEW
ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:137 ctstate NEW
ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:138 ctstate NEW
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:8080 ctstate NEW
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:80 ctstate NEW

Chain IN_ZONE_internal_deny (1 references)
target     prot opt source               destination         

Chain IN_ZONE_public (1 references)
target     prot opt source               destination         
IN_ZONE_public_deny  all  --  0.0.0.0/0            0.0.0.0/0           
IN_ZONE_public_allow  all  --  0.0.0.0/0            0.0.0.0/0           

Chain IN_ZONE_public_allow (1 references)
target     prot opt source               destination         
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:22 ctstate NEW
ACCEPT     udp  --  0.0.0.0/0            224.0.0.251          udp dpt:5353 ctstate NEW
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:80 ctstate NEW
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:8080 ctstate NEW

Chain IN_ZONE_public_deny (1 references)
target     prot opt source               destination         

Chain IN_ZONE_work (0 references)
target     prot opt source               destination         
IN_ZONE_work_deny  all  --  0.0.0.0/0            0.0.0.0/0           
IN_ZONE_work_allow  all  --  0.0.0.0/0            0.0.0.0/0           

Chain IN_ZONE_work_allow (1 references)
target     prot opt source               destination         
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:22 ctstate NEW
ACCEPT     udp  --  0.0.0.0/0            224.0.0.251          udp dpt:5353 ctstate NEW
ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:631 ctstate NEW

Chain IN_ZONE_work_deny (1 references)
target     prot opt source               destination         

Chain OUTPUT_direct (1 references)
target     prot opt source               destination  

Edit: Output of netstat -an | grep '^tcp':

[root@localhost etc]# netstat -an | grep '^tcp'
tcp        0      0 127.0.0.1:9999          0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:8080          0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:6000            0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:4447          0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:9990          0.0.0.0:*               LISTEN     
tcp        0      0 10.1.5.4:42019          203.190.124.28:80       TIME_WAIT  
tcp        0      0 10.1.5.4:59036          198.252.206.25:80       ESTABLISHED
tcp        0      0 10.1.5.4:40731          74.125.236.111:443      ESTABLISHED
tcp        0      0 10.1.5.4:43896          74.125.236.33:80        ESTABLISHED
tcp        0      0 10.1.5.4:57049          74.125.236.160:80       ESTABLISHED
tcp        0      0 10.1.5.4:52908          74.125.236.162:443      ESTABLISHED
tcp        0      0 10.1.5.4:48313          204.154.94.81:443       ESTABLISHED
tcp        0      0 10.1.5.4:59059          198.252.206.25:80       ESTABLISHED
tcp        0      0 10.1.5.4:50342          74.125.236.161:80       ESTABLISHED
tcp        0      0 10.1.5.4:42020          203.190.124.28:80       TIME_WAIT  
tcp        0      0 10.1.5.4:48398          74.125.135.95:80        TIME_WAIT  
tcp        0      0 10.1.5.4:42036          68.232.44.121:80        TIME_WAIT  
tcp        0      0 10.1.5.4:42132          141.101.114.59:80       TIME_WAIT  
tcp        0      0 10.1.5.4:40183          96.17.182.57:80         TIME_WAIT  
tcp        0      0 10.1.5.4:57117          203.190.124.17:80       TIME_WAIT  
tcp        0      0 10.1.5.4:50606          198.252.206.16:80       ESTABLISHED
tcp        0      0 10.1.5.4:45892          74.125.236.40:80        ESTABLISHED
tcp        0      0 10.1.5.4:42133          141.101.114.59:80       TIME_WAIT  
tcp        0      0 10.1.5.4:42037          68.232.44.121:80        TIME_WAIT  
tcp6       0      0 :::111                  :::*                    LISTEN     
tcp6       0      0 :::6000                 :::*                    LISTEN     
tcp6       0      0 :::5298                 :::*                    LISTEN     
tcp6       0      0 :::22                   :::*                    LISTEN     
tcp6       0      0 ::1:631                 :::*                    LISTEN     
tcp6       0      0 :::9278                 :::*                    LISTEN     
share|improve this question
    
It has probably to do with your web-server configuration, what are you running nginx, apache? –  Anthon Jun 6 '13 at 10:52
    
Please post the output of sudo iptables -L -n and netstat -an | grep '^tcp' –  Michael Kjörling Jun 6 '13 at 11:47
    
@MichaelKjörling i Have added the detailed output to the question as you suggested . the problem persists . –  Altanai Bisht Jun 10 '13 at 6:51
    
@Anthon : iam running Jboss As 7.1.1 –  Altanai Bisht Jun 10 '13 at 8:07
    
Look at the third line of the netstat output; it shows that something is listening to 127.0.0.1 port 8080 over TCP (almost certainly your web server). There is nothing listening on any other IP with port 8080/tcp, which is your problem. That makes @michas' answer most likely correct: you need to configure the web server to listen to more than just 127.0.0.1. Once you set the web server to listen to the 10.x.x.x address as well, things will most likely start working for you. Refer to the web server's documentation for exact steps for that. –  Michael Kjörling Jun 10 '13 at 9:08

1 Answer 1

up vote 4 down vote accepted

Your box has multiple interfaces. Each interface can have multiple IP addresses. (among others there is 127.0.0.1 on lo and 10.1.5.5 on eth0, or something like that. - See ip addr for details.)

Now you have some kind of web server running on that box. To be accessible to others it has to bind to some interfaces or IP adresses.

Somewhere in the config file of your web server you should find a "listening" or "bind" option specifying an which addresses the server binds.

Currently it seems to only bind to 127.0.0.1, i.e. it is only accessible from your own box through the loopback interface. (see netstat -tpln for details.)

If you want to make it accessible from everywhere change you can usually bind it to "*" or "0.0.0.0". - Have a look at your config documentation.

share|improve this answer
2  
Some applications want you to configure them to bind to 0.0.0.0 for them to listen on all addresses. That said, +1 for an answer that is probably what the OP is looking for even if it isn't exactly what was asked for. –  Michael Kjörling Jun 6 '13 at 11:46
    
@michas : Where should I add the bind specifications of "0.0.0.0" ? –  Altanai Bisht Jun 10 '13 at 8:13
    
What is the thing listening on 8080? Find out what it is and read documentation to find out where the configuration files are. (And please replace the two command outputs with the output of netstat -tpln in your question.) –  michas Jun 10 '13 at 19:27

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.