Accessing local websites without IP (bind)

Operating system: Linux
OS version: centos-release-8.2-2.2004.0.1.el8.x86_64
Hello,
I’m currently on a personal project, I’m fairly new to hosting and linux environment, I’m currently using Centos 8 on my machine, I have managed to host on my network some projects using virtualhosting (followed some guides), now I want to do it via VirtualMin (which I did), but the probelm is in both cases those are only reachable through the IP address, or by altering the hosts file and adding the IP address to the URL.

One way I could seperate these projects was, using the same IP different ports (example port 800 for a project, 8000 for another etc…) but that’s just not worth it.

Now to my understanding, I need to setup a DNS server for my network but i can’t seem to make it work, I’ve followed exactly every guide I could possibly find on youtube but doesn’t seem to work: if I do not edit the hosts file, my websites are not reachable from other machines (other than typing the IP address).

Is there something I’m not understanding? or just not setting up the DNS right? I’m using VirtualMin’s BIND

Hello @Lowji and welcome to the community.

Obviously, that’s not the right way for you to proceed.

Or just use Virtualmin’s DNS… it should work out of the box.

So all I have to do is setup the primary DNS the ip address of the machine hosting those, and that’s it? (can’t confirm right now since I had to create new VMs and can’t download those)

@Lowji,

If you require assistance getting Virtualmin setup correctly for your needs I can offer you a FREE half hour one-on-one screen sharing session to go over things with you.

Drop me a private message if you are interested.

Best Regards,
Peter Knowles | TPN Solutions

Thank you so much for your replies, indeed I just noticed how stupid I was not setting up the DNS route on my machines…having the default DNS server works wonderfully, except I had to change inside the DNS Master settings the IP (Bind DNS took my external IP, is there a way to change it to another IP (my local ip) for future DNS creations?)

You are welcome @Lowji and it happens to the best of us - we often overlook the most obvious of things. Don’t sweat it.

See Virtualmin → System Settings → Server Templates: BIND DNS Domain in the dropdown box.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.