Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

1 Answer 1

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 at 1:41

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.