<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Control WebPanel Wiki &#187; csf firewall commands</title>
	<atom:link href="https://wiki.centos-webpanel.com/tag/csf-firewall-commands/feed" rel="self" type="application/rss+xml" />
	<link>https://wiki.centos-webpanel.com</link>
	<description>CentOS WebPanel Wiki</description>
	<lastBuildDate>Wed, 12 Feb 2025 20:38:16 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1.1</generator>
	<item>
		<title>CSF Firewall command line</title>
		<link>https://wiki.centos-webpanel.com/csf-firewall-command-line</link>
		<comments>https://wiki.centos-webpanel.com/csf-firewall-command-line#comments</comments>
		<pubDate>Wed, 21 Jun 2017 19:28:32 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[csf firewall commands]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=763</guid>
		<description><![CDATA[CSF/LFD Firewall is installed by default on all CWP servers. Here you can find useful commands you can use from your terminal. To get the list of all options please use this commands csf --help man csf Configuration location is in the folder /etc/csf/ Main configuration file: /etc/csf/csf.conf Enable CSF Firewall csf -e Disable CSF [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>CSF/LFD Firewall is installed by default on all CWP servers.<br />
Here you can find useful commands you can use from your terminal.<br />
To get the list of all options please use this commands</p>
<pre>csf --help
man csf</pre>
<p>Configuration location is in the folder /etc/csf/<br />
Main configuration file: /etc/csf/csf.conf</p>
<p>Enable CSF Firewall</p>
<pre>csf -e</pre>
<p>Disable CSF Firewall</p>
<pre>csf -x</pre>
<p>Restart CSF Firewall (iptables rules)</p>
<pre>csf -r</pre>
<p>Restart CSF/LFD Firewall (iptables rules and LFD service)</p>
<pre>csf -ra</pre>
<p>Restart LFD only</p>
<pre>service lfd restart</pre>
<p>Check blocked IP reason (replace IP with the IP address)</p>
<pre>csf -g IP
grep "IP" /var/log/lfd.log</pre>
<p>Block IP (permanently)</p>
<pre>csf -d IP</pre>
<p>Block IP (temporarily for 24 hours, define in seconds)</p>
<pre>csf -td IP 86400</pre>
<p>Unblock IP</p>
<pre>csf -dr IP</pre>
<p>Whitelist IP (allow access to all ports)</p>
<pre>csf -a IP</pre>
<p>Whitelist IP range /24 (allow access to all ports)</p>
<pre>csf -a 192.168.0.0/24</pre>
<p>Whitelist (temporarily) IP range /24 for 24 hours (allow access to all ports, define in seconds)</p>
<pre>csf -ta 192.168.0.0/24 86400</pre>
<p>Remove all temporary IP blocks</p>
<pre>csf -tf</pre>
<p>Remove all permanent IP blocks</p>
<pre>csf -df</pre>
<p>....and many others</p>
]]></content:encoded>
			<wfw:commentRss>https://wiki.centos-webpanel.com/csf-firewall-command-line/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
