Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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

On CentOs 6.4 I cannot connect to the media server from port 1935 only 5080. I have read you can edit the iptables files with following.

  1. Open flle /etc/sysconfig/iptables:

    $ sudo vi /etc/sysconfig/iptables
  2. Append rule as follows:

    -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport XY -j    ACCEPT
  3. Save and close the file. Restart iptables:

    $ sudo /etc/init.d/iptables restart

How would I specifically configure port 1935? The above seems to be open to all ports, is this correct? Do I replace XY with 1935?

share|improve this question
up vote 1 down vote accepted

It just opens port XY, i.e., there you should put your 1935.

I'd advise to use the command your distribution uses to configure the firewall (on Fedora, RHEL and clones it is system-config-firewall). Easier on the brain, less likely to screw everything up, takes care of ancilliary tasks like reloading rules and saving them away for later boots).

share|improve this answer
The above script is for CentOs 6.4 so it will be alright? Or are you saying generally configure the firewall. – cea Feb 7 '14 at 1:41

Your Answer


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.