• 0 Posts
  • 18 Comments
Joined 1 year ago
cake
Cake day: June 10th, 2023

help-circle










  • 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.




  • The old answer is a chroot jail, the new answer is a Docker container or VM if Docker won’t cut it.

    I’m lazy, so Virtualbox is my VM software of choice. I keep a machine with a fresh debian install and just Clone it to make throwaway VMs.

    Keep in mind that malicious software on a VM might be isolated from the host in many ways, but if it’s allowed to communicate on your network then it can still be dangerous, especially if you have samba shares, or services you don’t expose to the outside internet with weak or default passwords. (Did you change the admin password on your router’s Web interface?)

    Creating a VM with no network interfaces is “mostly safe”, but you hear about VM bust out exploits now and then.

    In reality, gold standard is a separate physical computer with no network connections to anything but other untrusted physical computers, and no wireless adapters (Bluetooth or WiFi). This is an “air gapped” network, but if you’re dealing with shit that makes you want an air gap, either you already know more than you’re gonna learn on Lemmy, or you’re bout to get your door kicked in by men in black suits :D