<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>Linux Hosting Talk - On the Server</title>
		<link>http://www.linuxhostingtalk.com/</link>
		<description>Discuss things on the server; CLI, Apache, Bind, SSH, etc..</description>
		<language>en</language>
		<lastBuildDate>Sun, 19 May 2013 13:43:54 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.linuxhostingtalk.com/images/styles/TotallyPro/misc/rss.png</url>
			<title>Linux Hosting Talk - On the Server</title>
			<link>http://www.linuxhostingtalk.com/</link>
		</image>
		<item>
			<title>Learn the csf command line flags</title>
			<link>http://www.linuxhostingtalk.com/showthread.php/2142-Learn-the-csf-command-line-flags?goto=newpost</link>
			<pubDate>Thu, 25 Apr 2013 16:52:28 GMT</pubDate>
			<description>Knowing the csf flags will help you to quickly get things done - instead of loading up the GUI every single time. 
 
Here are some of the ones I use...</description>
			<content:encoded><![CDATA[<div>Knowing the csf flags will help you to quickly get things done - instead of loading up the GUI every single time.<br />
<br />
Here are some of the ones I use all the time.<br />
<br />
csf -r  (Restart CSF)<br />
csf -d (quick deny an ip:  csf -d xxx.xxx.xxx.xxx)<br />
csf -a (quick allow / whitelist an ip:  csf -a xxx.xxx.xxx.xxx)<br />
csf -dr (unblock an ip and remove from the deny list:  csf -dr xxx.xxx.xxx.xxx)<br />
<br />
Here are all of them:<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">Usage: /usr/sbin/csf [option] [value]<br />
<br />
<br />
Option&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Meaning<br />
-h, --help&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Show this message<br />
-l, --status&nbsp; &nbsp; &nbsp; &nbsp; List/Show iptables configuration<br />
-l6, --status6&nbsp; &nbsp; &nbsp; List/Show ip6tables configuration<br />
-s, --start&nbsp; &nbsp; &nbsp; &nbsp;  Start firewall rules<br />
-f, --stop&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Flush/Stop firewall rules (Note: lfd may restart csf)<br />
-r, --restart&nbsp; &nbsp; &nbsp;  Restart firewall rules<br />
-q, --startq&nbsp; &nbsp; &nbsp; &nbsp; Quick restart (csf restarted by lfd)<br />
-sf, --startf&nbsp; &nbsp; &nbsp;  Force CLI restart regardless of LFDSTART setting<br />
-a, --add ip&nbsp; &nbsp; &nbsp; &nbsp; Allow an IP and add to /etc/csf.allow<br />
-ar, --addrm ip&nbsp; &nbsp;  Remove an IP from /etc/csf.allow and delete rule<br />
-d, --deny ip&nbsp; &nbsp; &nbsp;  Deny an IP and add to /etc/csf.deny<br />
-dr, --denyrm ip&nbsp; &nbsp; Unblock an IP and remove from /etc/csf.deny<br />
-df, --denyf&nbsp; &nbsp; &nbsp; &nbsp; Remove and unblock all entries in /etc/csf.deny<br />
-g, --grep ip&nbsp; &nbsp; &nbsp;  Search the iptables rules for an IP match (incl. CIDR)<br />
-t, --temp&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Displays the current list of temp IP entries and their TTL<br />
-tr, --temprm ip&nbsp; &nbsp; Remove an IPs from the temp IP ban and allow list<br />
-td, --tempdeny ip ttl [-p port] [-d direction]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Add an IP to the temp IP ban list. ttl is how long to<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; blocks for (default:seconds, can use one suffix of h/m/d).<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Optional port. Optional direction of block can be one of:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; in, out or inout (default:in)<br />
-ta, --tempallow ip ttl [-p port] [-d direction]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Add an IP to the temp IP allow list (default:inout)<br />
-tf, --tempf&nbsp; &nbsp; &nbsp; &nbsp; Flush all IPs from the temp IP entries<br />
-cp, --cping&nbsp; &nbsp; &nbsp; &nbsp; PING all members in an lfd Cluster<br />
-cd, --cdeny ip&nbsp; &nbsp;  Deny an IP in a Cluster and add to /etc/csf.deny<br />
-ca, --callow ip&nbsp; &nbsp; Allow an IP in a Cluster and add to /etc/csf.allow<br />
-cr, --crm ip&nbsp; &nbsp; &nbsp;  Unblock an IP in a Cluster and remove from /etc/csf.deny<br />
-cc, --cconfig [name] [value]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Change configuration option [name] to [value] in a Cluster<br />
-cf, --cfile [file] Send [file] in a Cluster to /etc/csf/<br />
-crs, --crestart&nbsp; &nbsp; Cluster restart csf and lfd<br />
-w, --watch ip&nbsp; &nbsp; &nbsp; Log SYN packets for an IP across iptables chains<br />
-m, --mail [addr]&nbsp;  Display Server Check in HTML or email to [addr] if present<br />
-lr, --logrun&nbsp; &nbsp; &nbsp;  Initiate Log Scanner report via lfd<br />
-c, --check&nbsp; &nbsp; &nbsp; &nbsp;  Check for updates to csf but do not upgrade<br />
-u, --update&nbsp; &nbsp; &nbsp; &nbsp; Check for updates to csf and upgrade if available<br />
-uf&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  Force an update of csf<br />
-x, --disable&nbsp; &nbsp; &nbsp;  Disable csf and lfd<br />
-e, --enable&nbsp; &nbsp; &nbsp; &nbsp; Enable csf and lfd if previously disabled<br />
-v, --version&nbsp; &nbsp; &nbsp;  Show csf version</code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://www.linuxhostingtalk.com/forumdisplay.php/9-On-the-Server">On the Server</category>
			<dc:creator>Rob</dc:creator>
			<guid isPermaLink="true">http://www.linuxhostingtalk.com/showthread.php/2142-Learn-the-csf-command-line-flags</guid>
		</item>
		<item>
			<title>Script to bulk check domain name servers (or IP, or txt records, etc..)</title>
			<link>http://www.linuxhostingtalk.com/showthread.php/2136-Script-to-bulk-check-domain-name-servers-(or-IP-or-txt-records-etc-)?goto=newpost</link>
			<pubDate>Wed, 24 Apr 2013 13:57:36 GMT</pubDate>
			<description><![CDATA[Let's say you have 20 domains and you want to quickly find out what name servers they're all using.  Do this. 
 
Create a file calling it whatever...]]></description>
			<content:encoded><![CDATA[<div>Let's say you have 20 domains and you want to quickly find out what name servers they're all using.  Do this.<br />
<br />
Create a file calling it whatever you want.  We'll name it domain_list.<br />
<br />
Enter in all of the domains you want to check, each on a new line.<br />
<br />
Example:<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">domain1.com<br />
domain2.com<br />
domain3.com<br />
domain4.com</code><hr />
</div>Now, run this command to check each one:<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">for M in $(cat ./domain_list);do dig @8.8.8.8 $M ns +noadditional +nocomments +nostats +noquestion;done</code><hr />
</div>You'll get something like this:<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">[rob@station-222 ~]$ for M in $(cat ./domain_list);do dig @8.8.8.8 $M ns +noadditional +nocomments +nostats +noquestion;done<br />
<br />
<br />
; &lt;&lt;&gt;&gt; DiG 9.9.2-P1-RedHat-9.9.2-3.P1.fc17 &lt;&lt;&gt;&gt; @8.8.8.8 domain1.com ns +noadditional +nocomments +nostats +noquestion<br />
; (1 server found)<br />
;; global options: +cmd<br />
<br />
<br />
; &lt;&lt;&gt;&gt; DiG 9.9.2-P1-RedHat-9.9.2-3.P1.fc17 &lt;&lt;&gt;&gt; @8.8.8.8 domain2.com ns +noadditional +nocomments +nostats +noquestion<br />
; (1 server found)<br />
;; global options: +cmd<br />
<br />
<br />
; &lt;&lt;&gt;&gt; DiG 9.9.2-P1-RedHat-9.9.2-3.P1.fc17 &lt;&lt;&gt;&gt; @8.8.8.8 domain3.com ns +noadditional +nocomments +nostats +noquestion<br />
; (1 server found)<br />
;; global options: +cmd<br />
domain3.com.&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4764&nbsp; &nbsp; &nbsp; &nbsp; IN&nbsp; &nbsp; &nbsp; &nbsp; NS&nbsp; &nbsp; &nbsp; &nbsp; ns1.dsredirection.com.<br />
domain3.com.&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4764&nbsp; &nbsp; &nbsp; &nbsp; IN&nbsp; &nbsp; &nbsp; &nbsp; NS&nbsp; &nbsp; &nbsp; &nbsp; ns2.dsredirection.com.<br />
<br />
<br />
; &lt;&lt;&gt;&gt; DiG 9.9.2-P1-RedHat-9.9.2-3.P1.fc17 &lt;&lt;&gt;&gt; @8.8.8.8 domain4.com ns +noadditional +nocomments +nostats +noquestion<br />
; (1 server found)<br />
;; global options: +cmd<br />
domain4.com.&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 21599&nbsp; &nbsp; &nbsp; &nbsp; IN&nbsp; &nbsp; &nbsp; &nbsp; NS&nbsp; &nbsp; &nbsp; &nbsp; ns1.sedoparking.com.<br />
domain4.com.&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 21599&nbsp; &nbsp; &nbsp; &nbsp; IN&nbsp; &nbsp; &nbsp; &nbsp; NS&nbsp; &nbsp; &nbsp; &nbsp; ns2.sedoparking.com.<br />
[rob@station-222 ~]$</code><hr />
</div>As you can see, domain1.com and domain2.com don't have ns records set up.  If you were to do a whois on them, you'll see that they do have nameservers assigned to them, but since there's nothing set up, we don't care...<br />
<br />
You can do the same with mx records, A records, txt, spf records, etc..  Just change the 'ns' part in the command to the type of record you want to query.</div>

]]></content:encoded>
			<category domain="http://www.linuxhostingtalk.com/forumdisplay.php/9-On-the-Server">On the Server</category>
			<dc:creator>Rob</dc:creator>
			<guid isPermaLink="true">http://www.linuxhostingtalk.com/showthread.php/2136-Script-to-bulk-check-domain-name-servers-(or-IP-or-txt-records-etc-)</guid>
		</item>
	</channel>
</rss>
