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 want to open the port 18680 on my remote Fedora 14 machine. I did

sudo iptables -I INPUT -p tcp --dport 18680 -m state --state NEW,ESTABLISHED -j ACCEPT

sudo iptables -I OUTPUT -p tcp --sport 18680 -m state --state ESTABLISHED -j ACCEPT

sudo service iptables save

The status returned is OK.

I have also opened the port on my security group on Amazon. Also, I rebooted the machine.

When I use the browser to view the application running at port 18680 the browser cannot connect.

What am I doing wrong?

share|improve this question

migrated from stackoverflow.com Apr 17 '11 at 1:13

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

1 Answer 1

up vote 3 down vote accepted

In the AWS management console.

  1. Go to Amazon EC2 TAB

  2. Click on Instances and note the Security Group Name from the Security Group column for the instance you want to open it for.

  3. Click on the link Security Groups

  4. Click on the Security Group Name from step 2.

  5. You should see a dropdown, click it and select Custom

  6. Enter:

    Protocol                  TCP
    From Port                 18680
    To Port                   18680
    Source (IP or Group)      0.0.0.0/0       -- NOTE 1
    
  7. Click Save.


On Fedora to open a port on the ipables firewall you would either run the command:

iptables -A INPUT -m state --state NEW -m tcp -p tcp --dports 18680 -j ACCEPT

or directly edit the config file /etc/sysconfig/iptables:

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 18680 -j ACCEPT

Then save the changes with:

service iptables save

After that you can verify if the port is open with the command:

netstat -tulpn | less

And make sure the rule is in place with:

iptables -L -n

or

service iptables status

Also if u ever need you can restart iptables with:

servce iptables restart
share|improve this answer
    
I tried what you are suggesting but still it is not working. –  Alex Apr 17 '11 at 13:22

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.