From namecheap domain to nginx config to a working website

I don’t really know where else to ask, and I can’t do it.

  • I bought a namecheap domain, activated the dynamic dns service,
    wrote this:

A + Dynamic DNS Record * 127.0.0.1

  • below “dynamic dns”, installed ddclient but it doesn’t work

drm@dr-80qr ~> ddclient
WARNING: file /etc/ddclient/ddclient.conf: Cannot open file ‘/etc/ddclient/ddclient.conf’. (Permission denied)
stat() on closed filehandle FD at /usr/bin/ddclient line 1167.
Use of uninitialized value $mode in bitwise and (&) at /usr/bin/ddclient line 1168.
readline() on closed filehandle FD at /usr/bin/ddclient line 1180.
WARNING: file /etc/ddclient/ddclient.conf: Cannot open file ‘/etc/ddclient/ddclient.conf’. (Permission denied)
stat() on closed filehandle FD at /usr/bin/ddclient line 1167.
Use of uninitialized value $mode in bitwise and (&) at /usr/bin/ddclient line 1168.
readline() on closed filehandle FD at /usr/bin/ddclient line 1180.
WARNING: file /var/cache/ddclient/ddclient.cache: Cannot open file ‘/var/cache/ddclient/ddclient.cache’. (Permission denied)
stat() on closed filehandle FD at /usr/bin/ddclient line 1167.
Use of uninitialized value $mode in bitwise and (&) at /usr/bin/ddclient line 1168.
readline() on closed filehandle FD at /usr/bin/ddclient line 1180.

  • and my nginx configuration is:
  	server 	{
        listen       80;
        server_name  localhost my_website.org;
        root /home/drm/WEBSITE/public;
        error_page   500 502 503 504  /50x.html;
        location = /404.html {
            root /home/drm/WEBSITE/public;
        }
	}

What do I do from there ? Did I miss anything ? I know my namecheap login and “Dynamic DNS Password” but I think is ddclient failed me

Try: sudo systemctl enable --now ddclient.service

I did, and now it registers on htop.
according to namecheap’s knowledgebase,
the configuration should be:

use=web, web=dynamicdns.park-your-domain.com/getip
protocol=namecheap
server=dynamicdns.park-your-domain.com
login=the_url_people_should_use
password=weird_long_password
@

as shown in :
image

but how do I know it worked ?
the dynamic dns section doesn’t show any new IP, only the 127.0.0.1 that I entered.
I use a vpn but that use=web etc should update with the vpn ip.

And where do I get/set the port people will send request to ? I saw nothing of the like on namecheap ! I just know for sure the domain name exists because of the parking page.

Ok,
it worked ONCE while disabling the dyndns service and using my vpn public address WITHOUT port transfer.
Nothing else works, nor does my own public IP. And now the configuration below doesn’t work either: the site can be reached but it says national-naturalism.org sent no data.
What the hell is all that, how can it work once and not twice with the same damn parameters ?

I think you are confusing yourself.

A VPN provided connection is not a hosting provider.

You cannot ever make that work - just image two users doing so - which user should then receive the traffic?

You need the script to be run of your real IP address and you need portforwarding in your router on port 80 and port 443 to a working service on your network.

BUT some ISP will block unsolicited incoming traffic to their equipment and many ISP also block outgoing traffic targeting port 25 (figthing malware spam).

If your ISP blocks such incoming traffic you need to configure your DNS provider to send traffic to un priviliged ports e.g. 60080 and 60443.

In any case - using a Oracle free tier you will eliminate such issues.

Then how do you explain that it did work once ?
So you think the dynamic dns service can’t work with a vpn ?

Sheer luck

You cannot ever use a VPN provider to serve your domain by using dynamic dns or anything else - not entirely correct - you can get a VPN deal with a dedicated IP for your use only.

Dynamic DNS may work with your VPN. Although, it would defeat the privacy provided by the VPN.

Hosting a website behind your VPN probably won’t work though. Most VPN providers don’t support this.

It’s simple. I intend to move rather often, and here in particular I cannot asssociate my location to the website. I certainly won’t be able to configurate the router everywhere I go.
But how the hell does “luck” even exist, technically, in computer science ?

It does when a person with absolute no understanding of network routing and traffic manage to reach a locally hosted website through a VPN provided IP and a dyndns script once.

The statistical chance is compared to you getting 7 numbers in lotto with your first try. If I were you I would try my luck at lotto.

It is possible with some providers to get the same public IP no matter where you are.

NordVPN is one of those providers - and with such a VPN - anything is possible.

You probably can’t host easily host a website that way.

Otherwise there is no way to allow incoming traffic to your site.

Unless you have a VPN which specifically supports web hosting and inbound traffic or you use some type of reverse proxy.

Well the state of things is FAR from what I expected or imagined, that’s for sure.
In that case I would rather get my friend to host it. While I can’t nor don’t know how to configurate stuff here, and he won’t have any more ease, at least he has the right while I don’t…
on PIA it’s a “dedicated IP” and I won’t pay that, so let’s forget hosting dyndns.
But what port need I open/redirect/whatever on my router ?

If you want a website and you don’t have a stable network / static IP it is far better to just use a web hosting service, or do like I do and get a cheap Linode plan which gives you a full server environment. (Then you can do other cool things with it as well. I run my own email server for example)

2 Likes