2017年10月16日 星期一

How to Start / Stop / Enable / Disable firewalld on CentOS 7



Status of firewalld
sudo systemctl status firewalld

Stop firewalld
sudo systemctl stop firewalld


Start firewalld
sudo systemctl start firewalld


Disable firewalld
sudo systemctl disable firewalld

Enable firewalld
sudo systemctl enable firewalld

Unmask firewalld if you got "Failed to start firewalld.service: Unit is masked."
sudo systemctl unmask firewalld

Edit /usr/lib/firewalld/services/svnserve.xml for subversion (add port 3690)
<?xml version="1.0" encoding="utf-8"?>
<service>
  <short>svnserve</short>
  <description>This option allows you to access subversion (svn, svnserve).</description>
  <port protocol="udp" port="3690"/>
  <port protocol="tcp" port="3690"/>
</service>





Refer to
  1. http://blog.xuite.net/tolarku/blog/363801991-CentOS+7+Firewalld+%E9%98%B2%E7%81%AB%E7%89%86%E8%AA%AA%E6%98%8E%E4%BB%8B%E7%B4%B9
  2. https://www.rootusers.com/how-to-open-a-port-in-centos-7-with-firewalld/
  3. https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-using-firewalld-on-centos-7



沒有留言:

張貼留言