0

I have a domain to which I have access to the DNS administration, but my registrar does not have an API.

I have a VPS that I host my own websites.

I have a home fibre connection that sometimes changes IP and my home (Raspberry Pi) VPN becomes impossible to connect to as I do not know the new public IP.

As a workaround I have set up PushBullet (along with a script that runs daily) to send the new public IP to my phone, so i can update my VPN client and be able to access my home VPN. All works well.

I'm getting pretty annoyed with the frequency at which my IP changes and I have to keep editing and re-importing the VPN profile on my phone. I twon't let me change the IP without re-importing. Not the end of the world, but not the point.

As I have my own domain and VPS I was wondering how I could go about utilising my existing assets to create, essentially, a DIY DNS server or "forwarder" so I can create a subdomain to use in my config files, but also write a script on my Raspberry Pi to automatically update my VPS with the new IP so that any request (OpenVPN traffic) is sent to my Rasperry Pi server?

I could join up DynDNS or A-N-Other dynamic DNS provider, but I think I have the right tools.

I'm not looking at changing my name servers or anything like that.... my domains and websites all work perfectly as they are...

Would this be a job for BIND? Could IPTables suffice, given it can be defined to specific traffic?

Thank you!

0

You would have to create your own DNS server using BIND to take care of this issue, but in my opinion it would be best left to a dynamic DNS provider as any changes in your IP would likely be propagated in the DNS much quicker, not to mention security concerns associated with a diy DNS server can be complicated. I personally run a server computer on my not fiber home internet behind a router running dd-wrt firmware. I utilize afraiddns.org which dd-wrt has a configuration specifically for dynDNS. It has never had a problem and works like a charm.

New contributor
Aesonus is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.