OPNsense Forum

English Forums => General Discussion => Topic started by: rachanna on October 13, 2023, 08:02:40 AM

Title: Direct URL to IP
Post by: rachanna on October 13, 2023, 08:02:40 AM
Hello, I'm hosting a web server inside my LAN and I want to access that web server through URL from LAN and VPN. Please guide.
Title: Re: Direct URL to IP
Post by: Saarbremer on October 13, 2023, 09:44:10 AM
1. Set up unbound, see https://docs.opnsense.org/manual/unbound.html
2. Define Hostname/Domain and IP for your server in unbound
3. Make unbound your DNS in LAN and VPN
4. Make sure firewall rules are enabling traffic

Title: Re: Direct URL to IP
Post by: rachanna on October 13, 2023, 10:06:42 AM
Thanks, could you guide more in steps?
Title: Re: Direct URL to IP
Post by: Saarbremer on October 15, 2023, 09:13:46 AM
That depends on your actual requirements.

You should make sure first unbound is up and running. And that it is deployed as dns server for all your clients in LAN and VPN. The latter is achieved usually by configuring DHCP server to deliver the proper address. Or the VPN server accordingly.

Make sure traffic coming in on OPNsense interface for VPN (don't know what you are using, so it is hard to say exactly) directed to your server on port 80,443 is allowed to pass.

Maybe you're lucky and your server is registered as static lease in dhcp. Then, resolving it in a URL should work already. But again, i don't know your setup