A NAT vps shares an ipv4 address with other servers which help reduce the rent cost. It’s perfect for small apps and websites, like a shared hosting but with total server control and guaranteed resources.
LowEndSpirit, home of NAT vps providers.
I got a NAT vps from inception hosting (part of lowendspirit) for €3.00/year which I’m using for my tiny app. The cost is similar to a very cheap shared hosting but, I prefer to have more control on the server.
Logging-in to SSH.
So to access your server right away simply ssh to your external IP with the pre forwarded port as above, example if your local IP is 192.168.0.254 you would use- IP: 213.163.67.24 PORT: 25421
I spent at least an hour trying to login by following the above instruction but I can’t get in. I checked the LES forum and read that you need to login at the Serial Console first to change the SSH port.
- Login to the VPS SolusVM Control Panel.
- Goto the Serial Console then click Create Session button.
- You will receive a temporary ssh login details. Use Putty or something similar to connect.
- Once successfully logged-in, type
nano /etc/ssh/sshd_config
to edit the SSH port. - Find the line below and replace the port with one of the assigned 20 ports for your NAT ipv4 address. For example, if your local IP is
190.x.x.10
, your 20 ports should be from1001 - 1020
. Pick one from that ports and use it as your ssh port.
12# What ports, IPs and protocols we listen forPort 1020 - Save the file, press
CTRL + X then Y
to commit changes. - Type
service sshd restart
to apply the changes. - Now logoff and login using: External IP : YourChosenPort
NGINX Web Server
- Apply updates. Type
apt-get update
thenapt-get install nginx
- If successful, visit External-IP:Port (1001-1019) to check installation.
- Go to
/etc/nginx/sites-enabled
and typenano domain.com.conf
to create file.
12345678910111213141516server {listen 80;server_name domain.com;proxy_set_header Host domain.com; # Make sure to add thisroot /var/www/domain.com/public;index index.html index.htm;client_max_body_size 32m;access_log off;error_log /var/www/domain.com/error.log;# Disable viewing .htaccess & .htpasswordlocation ~ /\.ht {deny all;}} - Don’t forget to create the folder
/var/www/domain.com/public
then upload the contents. - Restart nginx
service nginx restart
or/etc/init.d/nginx restart
- Your site domain.com will still not load, head back to Solus Panel, scroll down, then click the Proxy Domains tab.
- Add all the domains and sub domains that your server hosts. After that, your websites should now load.