port – Internetblog.org.uk https://www.internetblog.org.uk Web hosting, Domain names, Dedicated servers Fri, 29 Jan 2016 11:05:52 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.5 https://www.internetblog.org.uk/files/2016/01/cropped-favico-32x32.png port – Internetblog.org.uk https://www.internetblog.org.uk 32 32 How to Change Your FTP Port https://www.internetblog.org.uk/post/1556/how-to-change-your-ftp-port/ Wed, 21 Jul 2010 16:54:55 +0000 http://www.internetblog.org.uk/post/1556/how-to-change-your-ftp-port/ FTP iconThe default port for most FTP servers is 21, and that is how most system administrators will leave it. The majority of FTP clients are configured to use it, and some will not even ask you to change it unless you dig through the configuration. There are, however, a few situations where you might want to change the FTP port for your dedicated server or VPS.

If you do not have other users accessing your server and want to add a little security by making your FTP port something no one would guess, you can easily change the port in ProFTPD or Vsftpd.

To change the port in ProFTPD, edit the configuration file, /etc/proftpd.conf and change the following line:

Port 21

Replace “21” with whatever port number you want.

To change the port in Vsftpd, edit /etc/vsftpd/vsftpd.conf and change the line:


When you are finished, you should restart your FTP server to force the changes to take effect.

There are a few issues you should note. Before changing the port, make sure the port you want to use is available and not used by another service. Also, after you free up port 21, you should close it in your firewall settings and open whatever port you have opened to replace it.

Running Apache on Another Port https://www.internetblog.org.uk/post/1555/running-apache-on-another-port/ Wed, 21 Jul 2010 16:51:09 +0000 http://www.internetblog.org.uk/post/1555/running-apache-on-another-port/ Apache featherQuestion: I have one instance of Apache running on the standard port 80, but I would like to run another on port 8080 for a different web application. Is this possible?

Answer: Yes, it is possible, and it is actually easier than you may think. Rather than creating a new install of Apache, all you have to do is create a virtual host that runs on the alternative port.

The first thing you need to do is open your Apache configuration file. On CentOS it is in /etc/httpd/conf/httpd.conf.

You should see the default “Listen” like that looks something like:

Listen 80

This tells Apache to listen to all addresses on port 80. You will want to create virtual hosts and have one of them on port 8080. Many web-based control panels have tools to make it easier. If not, simply make the configuration look like this:


Servername main.servername.com
Serveralias servername.com www.servername.com
DocumentRoot /home/path/documents1/

Servername main.otherservername.com
Serveralias otherservername.com www.otherservername.com
DocumentRoot /home/path/documents2/

Troubleshooting Database Connections https://www.internetblog.org.uk/post/1521/troubleshooting-database-connections/ Mon, 12 Jul 2010 19:17:37 +0000 http://www.internetblog.org.uk/post/1521/troubleshooting-database-connections/ Drupal database connection error
When MySQL works correctly, it can be a thing of beauty, but when something goes wrong, it can drive you mad. Here are a few things you can do to troubleshoot connection problems:

1. Make sure your username and password are correct.
2. Double-check the hostname. Although “localhost” works on most servers, it may not on yours.
3. Test the connection string (if you wrote the code yourself). You may have a simple typo.
4. If you have your own server, check the mysql server to see if it is running and running without errors.
5. Does the database you are trying to connect to actually exist? Sometimes automatic database creation fails, and you are left wondering why you cannot connect to it.
6. If you can connect locally but cannot connect remotely, check your firewall settings to see if port 3306 (or whichever port you use for mysql) is open.
7. Finally, be sure your mysql user has the necessary privileges to perform whatever task you are trying to accomplish.

Photo Source: Flickr

How to Connect via SSH https://www.internetblog.org.uk/post/1502/how-to-connect-via-ssh/ Tue, 06 Jul 2010 19:03:02 +0000 http://www.internetblog.org.uk/post/1502/how-to-connect-via-ssh/ SSH secure iconSSH stands for Secure Shell and is a secure encrypted method of connecting to a server for shell/command line access. It can be useful for shared hosting, virtual private servers, and dedicated servers. Linux server usually come with SSH enabled by default, although some web hosts may disable it for shared hosting accounts.

To connect to your server via SSH, simply type:

ssh -l(username) hostname_or_ip

It will prompt you for a password. Type your password, and you should be connected. Some web hosts may use a different port for SSH, other than the default port (22). If so, you will need to specify it, for example:

ssh -p 2222 -lmyname webserver.com

Normal Linux/Unix shell commands apply, once you are logged into the server. When you are finished, simply type “exit”.

How to Connect via FTP https://www.internetblog.org.uk/post/1501/how-to-connect-via-ftp/ Tue, 06 Jul 2010 19:00:01 +0000 http://www.internetblog.org.uk/post/1501/how-to-connect-via-ftp/ FTP iconFTP stands for File Transfer Protocol and is the most widely accepted method for uploading files to a web server. All web hosting companies offer FTP service, but there may be slight differences in how you connect to them. To begin, you will need an FTP client, such as Filezilla, a free and open source, cross-platform FTP program.

To begin, choose to create a new connection. For the “hostname” enter your domain name without the “www” or use the IP address given to you by your web host. You can normally leave “port” as is unless your hosting provider gave you a port other than the default (21). The username will be whatever your host assigned. It could be use a name or your entire email address (particularly if it is a shared hosting account). If you are not sure, contact your host. Next, enter your password.

You should then be able to click “connect” and have no problems getting logged in. If you cannot, the first thing to check is your password and then username. If those are both correct, contact your web host to make sure you have the right information. If you have your own dedicated server, you may need to configure your FTP server before you can connect to it. You can do this in your web-based control panel or through SSH.

Using netstat to monitor a server https://www.internetblog.org.uk/post/1460/using-netstat-to-monitor-a-server/ Wed, 23 Jun 2010 18:50:16 +0000 http://www.internetblog.org.uk/post/1460/using-netstat-to-monitor-a-server/ Network iconIt is important to always keep a watchful eye on your dedicated server. Monitoring tools may be external, available through service providers, or internal, already included in your Linux distribution. One important internal monitoring tool is netstat.

Netstat can provide you with useful information about the ports that system services are using. For example, to display information about the services using port 80, type the following command:

netstat -ant | grep 80

The command by itself will show all of the instances running on every port, but you can limit the output to port 80 with grep. This is a quick way to see how many instances of port 80 (your web server) are actually running. If you want to count them, type this command:

netstat -ant | grep 80 | wc -l

Netstat has many other features that you can use to learn about your network ports and how they are being used. For complete documentation on netstat, type “man netstat” from the command line.

Safe anonymous FTP https://www.internetblog.org.uk/post/818/safe-anonymous-ftp/ Thu, 24 Dec 2009 23:24:10 +0000 http://www.internetblog.org.uk/post/818/safe-anonymous-ftp/ Anonymous FTP server
Question: Is it safe to setup anonymous FTP services for my website visitors?

Answer: Anonymous FTP can be a useful feature when used correctly. If you are moving a lot of files, especially if you have some type of software or game repository, anonymous FTP may be a practical and easy solution.

Anytime you give users one more way to access your server, however, you open up new possibilities for security breaches. Your web server, most likely uses port 80 for HTTP and port 443 for HTTPS. By providing anonymous FTP access, you are adding port 21 into the mix. Here are a few things you can do to make sure it is secure:

1. Check to make sure the SITE EXEC command is disabled
2. Make sure you have chrooted your users so that they cannot access other directories.
3. Make sure that the files are not writable by the users. If you need users to upload files, only their own chrooted directory should be writable.
4. Make sure no files or directories are owned by “ftp” or whatever user your FTP server runs as.

Be vigilant and plan carefully, and you should be able to have a safe and secure anonymous FTP server.