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

I am a total newbie concerning servers so excuse my humble question :-)

Someone developed for me a python application that acts as a web serveur. This TCP application needs to listen to port 8080.

[root@blabla jll]# netstat -tanpu | grep ":8080"
tcp        0      0 0.0.0.0:8080                0.0.0.0:*                   LISTEN      18209/python

It seems that 8080 is not opened on my server firewall. To open it, I tried to modify iptables rules like this :

/sbin/iptables -A RH-Firewall-1-INPUT -i eth0 -p tcp --dport 8080 -j ACCEPT

However I still have nothing at http://my.server.name:8080.

(I am not even sure about "RH-Firewall-1-INPUT" or "INPUT")

What can I do now ? Is there some kind of general procedure for such things ?

I give you the following usefull info :

/sbin/iptables -nvL
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
   49  3388 ACCEPT     tcp  --  eth0   *       0.0.0.0/0            0.0.0.0/0           tcp dpt:8080 
  25M 3736M 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 REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 

Chain OUTPUT (policy ACCEPT 43M packets, 41G bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain RH-Firewall-1-INPUT (1 references)
 pkts bytes target     prot opt in     out     source               destination         
 121K   15M ACCEPT     all  --  lo     *       0.0.0.0/0            0.0.0.0/0           
97773 8078K 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           
   17  2509 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 
  24M 3682M ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED 
26069 1319K ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22 
 3806  204K ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:443 
 563K   30M REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited

And :

    /sbin/iptables -nvL -t nat
Chain PREROUTING (policy ACCEPT 168K packets, 15M bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain POSTROUTING (policy ACCEPT 4200K packets, 252M bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy ACCEPT 4200K packets, 252M bytes)
 pkts bytes target     prot opt in     out     source               destination
share|improve this question

migrated from stackoverflow.com Mar 17 '11 at 13:32

This question came from our site for professional and enthusiast programmers.

    
Which operating system are running on your server? –  Helios Mar 17 '11 at 11:41
    
I am running Fedora 8 Linux –  JCLL Mar 17 '11 at 11:47
    
@JCLL please post the output of iptables-save, and is your web server the same as the firewall? –  pepoluan Mar 18 '11 at 13:19

1 Answer 1

Barring the output of iptables -nvL, iptables -nvL -t nat and iptables -nVL -t mangle, which would be useful to have in this case, here is a quickie that might work:

iptables -I INPUT 1 -i eth0 -p tcp --dport 8080 -j ACCEPT
share|improve this answer

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.