SVN open firewall port introduction, svn firewall port
Preface
Due to the previous laziness, the firewall was shut down after the server was installed with svn. Recently, the server was told to show signs of virus, so the Firewall should be enabled, however, opening the firewall will lead to svn access failure, so now there is a new requirement to open the svn service port.
Disable the firewalld Firewall service provided by the Virtual Machine
systemctl stop firewalld
Disable firewall auto-start
systemctl disabled firewalld
Install iptables-services
yum install -y iptables-services
Start the iptables service
systemctl start iptables
Set iptables to start automatically
systemctl enable iptables
Open/etc/sysconfig/iptables and enter the following content. Note that this sentence should be placed on the top of the last sentence, otherwise it will not take effect.
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3690 -j ACCEPT-A OUTPUT -m state --state NEW -m tcp -p tcp --dport 3690 -j ACCEPT
Restart the firewall to make the modification take effect.
service iptables restart
The VM firewall port 3690 is enabled. You can also run the following command to enable it:
iptables -I INPUT -p tcp --dport 8080 -j ACCEPTiptables -I OUTPUT -p tcp --dport 8080 -j ACCEPTservice iptables save
It takes effect after the service is restarted.
Summary
In fact, the process is not difficult, but we are a little lazy when we are doing it. When the problem arises, we will return to solve it again. Therefore, we will not be able to develop it in the first place, do a good job.