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.

The port 2222 has been blocked by Iptables on my VPS.

And I set SSH to use port 2222.

So now I can not login my VPS though SSH.

Sorry,I forget to give VPS distribution I am using.

It is Ubuntu 10.04 LTS 64 bit.

Can someone help me to resolve this problem?

share|improve this question
    
Please read an iptables howto (like help.ubuntu.com/community/IptablesHowTo -- you want section 5 in this one) and update your question if you need more specific assistance :-) –  voretaq7 May 20 '11 at 3:23

1 Answer 1

As you are locked out of your VPS you will now have to use whatever tools your VPS host provides for emergency recovery to disable iptables. As you don't mention which distribution you are using we can't help with that.

To open port 2222 will need to add something like the line below to your iptables configuration file.

-A INPUT -p tcp -m state --state NEW -m tcp --dport 2222 -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.