Hey all. Ive been hosting some software for a while now, some private, some public stuff.

Recently ive gotten myself a domain name, and i’m trying to come up with a good way to have access to both the public AND the private on the same URL. Simpleton that i am i thought about putting the public in an inline frame with a banner with links at the top, but im sure there are better ways.

Any ideas how to do this from this community?

  • ThreeHalflings@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    1 year ago

    Edit: misunderstood what OP wanted to do, leaving this here in case it’s interesting to anyone.

    Sounds like what you are tyring to do is called Split Horizon DNS.

    Requests from outside your network should resolve server.domain.com to the public IP, but requests from inside your network should resolve it to the private IP.

    If that’s what it is then you register the public IP with your nameservers. You also run a DNS service internally which you point all your computers at (likely by putting it as the DNS server in your networks DHCP settings). That DNS server is set up to return the private ip addresses for all your servers, and to forward any other requests to some external DNS like 1.1.1.1

    I’m not sure what your use case or for needing to use the internal IP address from inside the network, but it might be to avoid traffic exiting your network just to be sent back in? Or you me a that you want external requests to go to one server and internal to go to another server? I’m which case the set up above still works, but on just use the appropriate IP addresses in the appropriate places.