This is my first post, and I’m not sure is the right place. but hopefully, someone could help answering that.
I would like to use my home server to host multiple things Web Server/Email/FTP etc…
The thing is, I have a Dynamic IP Address here that doesn’t change too quickly (Thanks). I also have an No-IP DDNS.
I was thinking if it would be possible for me, to use a public VPS (with a static IP address) (like cheap vultr 5$) and automatically forward “name server” to my (Home IP address)…
I could build a script that will post automatically to the VPS my new IP at home when it changes.
So my domain name and so on, will simply route (NameServers) to my VPS and then, the VPS will forward to my web home server using my “HomeIP”.
Do you think that it possible to achieve something like that?
I know that for a website having a Static IP is more reliable than a static IP and it avoids Downtime for new IP (DNS resolution) mostly in cache with some providers, that makes issue due to propagation.
So basically the deal would be to point the domain name to this VPS and then (transparently) it will use the webserver from the home server.
Just have Wireguard VPN connect from home server into VPS where you have iptables forwarding from VPS WAN to home lab VPN server IP or use reverse proxy.
No ports to open on home router and doesn’t matter if home WAN IP changes since you’ll be using the VPS static IP.
yeah, you could do this really easily with a wireguard vpn. You would either need to port forward/dnat (probably snat too unless the wireguard vpn is the default gateway for the home server) the ports you want to the wireguard IP address on your home machine, or have a second ip address that routes through the wireguard vpn to your home machine. Most vps’s give secondary ipv6 for free, ipv4 is probably also possible to get 2 addresses on some VPS’s, but less likely than with ipv6.
If you only need ipv6, and you don’t have carrier grade nat on your ipv4 internet, you could use hurricane electric to get a static ipv6 connection. You would need a script to update when your ipv4 address changes similar to ddns, but with tunneled IPs instead of changing dns.
Wireguard can transistion between IPs on one side of the connection without dropping any connections inside the tunnel most of the time.
It seems that what you’re talking about is just DDNS with extra steps? Many DNS providers allow you to call their API directly and change your IP the same way you currently do with DuckDNS. Just set up an A record for your home IP and add all your sub domains as C-NAME records, that way you’ll only have to update one IP.
If you want to use the VPS, I would set up a VPN on your VPS and connect your server to it. That way you can direct requests to you static local IP and the external dynamic one don’t matter.
I already have my firewalls and port 443 are routed to my web server directly (home steup) and works fine when my domain name is pointed to this IP…
The thing is, I want my domain name pointing to my VPS (vultr) in order to have everytime this IP associated to the domain, but, when query are made or when someone wants to see the website, it will automaticaly hit my homeserver (dynamic IP address that was pushed to the VPS) avoiding “downtime”.
Also, I know that Vultr with 5$/month are limited in bandwidth resources monthly etc… So I’m just trying to find a way to get a Static IP but traffic are routed transparently to my home server. because with my ISP static IP is very expensive and needs business contracts
you could have a script just update a dnat and snat rule every time your home ip address changes. all traffic would appear to come from your vps instead of the original client.
wireguard would be more straight forward I think since it takes care of changing IPs automatically without even dropping a connection.
You can use a ddns provider and still get virtually no downtime if your IP changes. I own a domain with namecheap and I use their ddns. I setup an A record with 5 second TTL so if my IP ever changes it updates very quickly. All of my subdomains are cname records pointing to the main domain so they never have to be updated only the main domain ever changes and when it does it adjusts so quickly that I’ve never experienced any downtime.
Yes but some provider doesn’t update the dns IP so frequently.
Some providers have a dns resolvation cache of 6/12/24h and even if the TTL is 5s they will update it only when their cache expires.