Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I open ports tcp 5222 and udp 5222 on a centos 5 box running with cpanel,

I've tried doing it through iptables then when i've restarted the tables it freezes and timesout when i reload it seems that the iptables have reverted to what they were at before.

share|improve this question

closed as off-topic by Jenny D, Sven Apr 15 '15 at 8:27

  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 0 down vote accepted

You need to check what firewall you're running, on cPanel servers, it's common that apf or csf are running, type "csf" or "apf", if you get an answer for apf, I can't help you, never used it.

If you get something like csf help, edit /etc/csf/csf.conf and modify the TCP_IN and TCP_OUT variables and then issue "service csf restart".

If you get nothing for all those, you might just have a saved set, check out and see if there are any rules at /etc/sysconfig/iptables

share|improve this answer

Sounds like your method of connecting is getting cut off. How are you going about it? If it's by SSH, then you'll also need to open tcp/22. VNC uses 5900 for display :0, 5901 for display :1, etc. I'd also allow anything from interface "lo"; this ensures that the localhost can talk to itself, thereby enabling things like X and the font server, assuming you're using the GUI. It will also enable mysql, smtp, and other services. I haven't used postgresql, but I'm fairly sure it will use the same method.

The method of updating iptables you're using seems sound, otherwise.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.
{"cc_re__cc_re__cc_by_sa_3_0": ["                    <li><a href=\"//area51.stackexchange.com\" title=\"proposing new sites in the Stack Exchange network\">Area 51</a></li>\r\n                        <li><a href=\"//careers.stackoverflow.com\">Stack Overflow Careers</a></li>\r\n                    \r\n                </ol>\r\n            </td>\r\n    </tr>\r\n</table>\r\n                </div>\r\n            </div>\r\n            <div id=\"copyright\">\r\n                site design / logo &#169; 2016 Stack Exchange Inc; user contributions licensed under <a href=\"https://creativecommons.org/licenses/by-sa/3.0/\" rel=\"license\">cc by-sa 3.0</a> \r\n                with <a href=\"http://blog.stackoverflow.com/2009/06/attribution-required/\" rel=\"license\">attribution required</a>\r\n            </div>\r\n            <div id=\"svnrev\">\r\n                rev 2016.5.31.3626\r\n            </div>\r\n        </div>\r\n    </div>\r\n    <noscript>\r\n        <div id=\"noscript-warning\">Server Fault works best with JavaScript enabled<img src=\"http://pixel.quantserve.com/pixel/p-c1rF4kxgLUzNc.gif\" alt=\"\" class=\"dno\"></div>\r\n    </noscript>\r\n<script>"], "copyright__copyright__copyright": ["c. I'd also allow anything from interface \"lo\"; this ensures that the localhost can talk to itself, thereby enabling things like X and the font server, assuming you're using the GUI. It will also enable mysql, smtp, and other services. I haven't used postgresql, but I'm fairly sure it will use the same method.\n\nThe method of updating iptables you're using seems sound, otherwise.\n\nshare|improve this answer\n\nNot the answer you're looking for? Browse other questions tagged or ask your own question."]}