<?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>FTP &#8211; VeriTeknik</title>
	<atom:link href="https://www.veriteknik.net.tr/en/tag/ftp/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.veriteknik.net.tr/en/</link>
	<description>VeriTeknik Bilişim &#124; VeriTeknik Bilişim</description>
	<lastBuildDate>Wed, 07 Nov 2018 20:43:02 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Add New Hosting to a System Installed With Plugged.sh</title>
		<link>https://www.veriteknik.net.tr/en/add-new-hosting-to-a-system-installed-with-plugged-sh/</link>
					<comments>https://www.veriteknik.net.tr/en/add-new-hosting-to-a-system-installed-with-plugged-sh/#respond</comments>
		
		<dc:creator><![CDATA[Mustafa Emre Aydın]]></dc:creator>
		<pubDate>Wed, 03 Jul 2013 11:45:30 +0000</pubDate>
				<category><![CDATA[Data Bases]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[LINUX]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[lamp]]></category>
		<category><![CDATA[mysql]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=779</guid>

					<description><![CDATA[<p>If you use our LAMP installer script and want to add a new domain afterwards, we&#8217;ve created a simple script to ease up the process. This script creates a new user, adds the domain settings for Apache, adds a new MySQL Database and user, restarts necessary services. Simply get our script from here or on [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/add-new-hosting-to-a-system-installed-with-plugged-sh/">Add New Hosting to a System Installed With Plugged.sh</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>If you use our <a title="Download Plugged.in LAMP installer for CentOS 6.x" href="https://github.com/VeriTeknik/plugged.sh">LAMP installer script</a> and want to add a new domain afterwards, we&#8217;ve created a simple script to ease up the process. This script creates a new user, adds the domain settings for Apache, adds a new MySQL Database and user, restarts necessary services.</p>
<p>Simply get our script from <a href="https://github.com/VeriTeknik/plugged.sh">here</a> or on your server via wget.</p>
<pre class="brush: bash; gutter: true; first-line: 1">git clone https://github.com/VeriTeknik/plugged.sh.git</pre>
<p>Run the script (as root) to learn about the usage.</p>
<pre class="brush: bash; gutter: true; first-line: 1">sh hostingadd.sh

Usage: hostingadd.sh -u username -p password -d domain -ip IP -dbu dbuser -dbn dbname -dbp dbpass

 -u username : Set the LOGIN name (FTP user)
 -p password : Set the Password
 -d domain : Set the Domain
 -ip ip : Set the IP address for the domain
 -dbu dbuser : Set the MySQL User
 -dbn dbname : Set the MySQL Database Name
 -dbp dbpass : Set the MySQL User Password</pre>
<p>The parameters are explained above. The script will try to create the MySQL databases as root, so it will need access to MySQL. In order to manage it, you&#8217;ll have to create a <strong>.my.cnf</strong> file under your <strong>/root</strong>  path. The <strong>/root/.my.cnf file</strong> should be like this :</p>
<pre class="brush: text; gutter: true; first-line: 1">[client]
user=root
pass=yourMySQLrootPassword</pre>
<p>Don&#8217;t worry about writing your password in clear text. This file is restricted by root access anyway, so if someone can read this file, your server is already compromised.</p>
<p>You can access via FTP by using the username and password provided while running the script. You can also check if the database is successfully added via phpmyadmin (which is installed by plugged.sh)</p>
<p>There isn&#8217;t an uninstall script yet, but I&#8217;ll write one asap.</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/add-new-hosting-to-a-system-installed-with-plugged-sh/">Add New Hosting to a System Installed With Plugged.sh</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/add-new-hosting-to-a-system-installed-with-plugged-sh/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">779</post-id>	</item>
		<item>
		<title>A Simple FTP Status Daemon</title>
		<link>https://www.veriteknik.net.tr/en/a-simple-ftp-status-daemon/</link>
					<comments>https://www.veriteknik.net.tr/en/a-simple-ftp-status-daemon/#respond</comments>
		
		<dc:creator><![CDATA[Mustafa Emre Aydın]]></dc:creator>
		<pubDate>Wed, 25 Apr 2012 07:11:20 +0000</pubDate>
				<category><![CDATA[LINUX]]></category>
		<category><![CDATA[Programmin]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[smtp]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=335</guid>

					<description><![CDATA[<p>Here is a clumsy script to check on an FTP Service on a remote server if running or down. The script is written in Python and is a very draft one, but does the job. The main goal is to check whether we get any response from the FTP server while we try to connect [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/a-simple-ftp-status-daemon/">A Simple FTP Status Daemon</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Here is a clumsy script to check on an FTP Service on a remote server if running or down. The script is written in Python and is a very draft one, but does the job.</p>
<p>The main goal is to check whether we get any response from the FTP server while we try to connect anonymously. Don&#8217;t forget that this script probably won&#8217;t work if the FTP server allows anonymous connections.</p>
<p>We simply use the ftplib module to establish the FTP connection. After the successful (or failed) connection, we can report the status of the server via email, to achieve this we use the smtplib module.</p>
<p>The first lines seem simple,</p>
<pre class="brush: python; gutter: true; first-line: 1">#!/usr/bin/python
import ftplib, smtplib
server_ip='10.20.30.40'
sender='sender@email.com'
receivers=['john@email.com','doe@email.com']</pre>
<p>Above, after importing our modules, we&#8217;ve defined the ip address of our FTP server. After that, the sender email address is defined, and then a list containing the receivers.<br />
Now we can define our messages. We&#8217;ll have two messages, one for the UP status, and one for the DOWN.</p>
<pre class="brush: python; gutter: true; first-line: 1">message_up="""
 From: FTP Status DAEMON 
 To: John , Doe 
 Subject: FTP Service Running
The FTP Service on %s is running.
 """ % server_ip
message_down="""
 From: FTP Status DAEMON 
 To: John , Doe 
 Subject: FTP Service DOWN!
The FTP Service on %s is DOWN!!!
 """ % server_ip</pre>
<p>Now we can actually start the checking. The first try clause is checking if we can establish any kind of connection with the server. If the server is somehow down, or if only the FTP service is shut down, this will return some sort of error, which we will catch with the except clause, handle it with our smtp commands, then raise a system exit.</p>
<pre class="brush: python; gutter: true; first-line: 1">try : ftp=ftplib.FTP(server_ip)
except :
 print "FTP DOWN !!!"
 smtpObj = smtplib.SMTP('localhost')
 smtpObj.sendmail(sender,receivers,message_down)
 raise SystemExit</pre>
<p>And here&#8217;s the second check, if we somehow get to this line, it means that we&#8217;ve passed the system exit above, so our connection attempt with the server worked, but we&#8217;re not sure if the FTP service is actually running without a login attempt. When we try to login, and if anonymous connection isn&#8217;t allowed, we&#8217;ll get a permission error, handling it with an exception we can email the recievers that the server is running.</p>
<pre class="brush: python; gutter: true; first-line: 1">try : ftp.login()
except ftplib.error_perm :
 print "FTP Up, Permission Denied."
 smtpObj = smtplib.SMTP('localhost')
 smtpObj.sendmail(sender,receivers,message_up)</pre>
<p>Now simply connect the dots and add the whole script to your crontab, then you&#8217;re good to go!</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/a-simple-ftp-status-daemon/">A Simple FTP Status Daemon</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/a-simple-ftp-status-daemon/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">335</post-id>	</item>
		<item>
		<title>Ephemeral port range for FTP</title>
		<link>https://www.veriteknik.net.tr/en/ephemeral-port-range-for-ftp/</link>
					<comments>https://www.veriteknik.net.tr/en/ephemeral-port-range-for-ftp/#respond</comments>
		
		<dc:creator><![CDATA[ckaraca]]></dc:creator>
		<pubDate>Fri, 22 Apr 2011 09:05:05 +0000</pubDate>
				<category><![CDATA[LINUX Help]]></category>
		<category><![CDATA[Ephemeral]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[port]]></category>
		<guid isPermaLink="false">http://plugged.in/?p=6</guid>

					<description><![CDATA[<p>The standart linux distrubition calls that the ephemeral port range be between 1024 and 4999. We we all know that some of these ports are used for other more importand applications than FTP. So security is an issue because leaving those original ports open leads to major security holes. Rather than openning ports that need [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/ephemeral-port-range-for-ftp/">Ephemeral port range for FTP</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>The standart linux distrubition calls that the ephemeral port range be between 1024 and 4999. We we all know that some of these ports are used for other more importand applications than FTP. So security is an issue because leaving those original ports open leads to major security holes. Rather than openning ports that need higher security for FTP we will change the port range. With this modified port range you can open your firewall to ports that do not have any use but PASV FTP.</p>
<p>First find out what the defined port range is</p>
<blockquote><p># cat /proc/sys/net/ipv4/ip_local_port_range<br />
1024 4999</p></blockquote>
<p>Know select the port range that you wan, I will define a port range of my desire but this is up to the network admin.<br />
To change the port range you have two option</p>
<p>Edit with nano or vi /proc/sys/net/ipv4/ip_local_port_range<br />
Or</p>
<blockquote><p>echo &#8220;55001 65535&#8221; &gt; /proc/sys/net/ipv4/ip_local_port_range</p></blockquote>
<p>These will both change the port, chech this with # cat /proc/sys/net/ipv4/ip_local_port_range</p>
<p>To make these changes permanent as these definitions will vanish on every reboot you need to put a script in /etc/sysctl.conf</p>
<p>Nano or vi /etc/sysctl.conf<br />
Add</p>
<blockquote><p># Controls Ephemeral Port Range (this is for the admin to remember what it is)<br />
net.ipv4.ip_local_port_range = 55001 65535</p></blockquote>
<p>Save<br />
Exit<br />
Reboot (if you like)<br />
And you are done!</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/ephemeral-port-range-for-ftp/">Ephemeral port range for FTP</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/ephemeral-port-range-for-ftp/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">6</post-id>	</item>
	</channel>
</rss>
