Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a fedora server on a local network which I can access through VNC.

I am trying to install a JIRA plugin called Activity timeline, these are both built using Java.

When I log into VNC and view:

http://localhost:8040/setup/index

I can see the correct page.

However when I attempt to access this page remotely:

http://ourip:8040/setup/index

The page times out. I have JIRA running on port 8094 which I can access:

http://ourip:8094/

I am not sure what I need to do to make this port available.

I can see that 8040 may already be running something else, I don't want this running on this port any more.

$grep -w 8040 /etc/services 
ampify          8040/tcp                # Ampify Messaging Protocol
ampify          8040/udp                # Ampify Messaging Protocol

$ netstat -tulpn | grep -w 8040
tcp        0      0 :::8040                     :::*                        LISTEN      11425/java  

My iptables file looks like this:

:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5900 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 5900 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5902 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 5902 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8094 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8040 -j ACCEPT
COMMIT

Where I added this line:

-A INPUT -m state --state NEW -m tcp -p tcp --dport 8040 -j ACCEPT

Any help would be appreciated.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The problem is that your newly added

-A INPUT -m state --state NEW -m tcp -p tcp --dport 8040 -j ACCEPT

only comes after the general reject rule

-A INPUT -j REJECT --reject-with icmp-host-prohibited

Move it before that and it should work.

share|improve this answer
    
Perfect, thanks –  Ian Jamieson Feb 4 '13 at 11:07

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.