We have a Debian Web server and would like our local LAN user to access the server by local ip - but would like the public to access the server using the static ip.

how can we set this up so that when local user open www.domain.com - they are transferred to web server ip); but if outside the network access www.domain.com they are sent to [PUBLIC IP].

[PUBLIC IP] access is working but our local users are also use the public route to return back to web server.

  • 2
    Google for "split DNS" and "DNS views". – Satō Katsura Aug 12 '16 at 12:40

You you must be having two DNS servers , one is for local insiders , and the other one as live DNS server.

Set the name resolution to local private ip for your website in local DNS server which handles name resolutions for you organization users on private LAN, and set the name resolution to static live ip in live DNS server which handles name resolutions for outside users.

You web server must be serving on both the IPs.

This is just one approach.

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.