Talk:DNS Correction for the Staging Server

From Open Source Ecology
Jump to: navigation, search

Michael changed the procedure for how to disconnect so that DNS addressing works after a session. Read below.

Hey Marcin,

I updated the wiki with a safer alternative to updating the system's DNS for accessing the staging server after connecting to the VPN.

* https://wiki.opensourceecology.org/wiki/DNS_Correction_for_the_Staging_Server
* https://wiki.opensourceecology.org/wiki/OSE_Staging_Server#Accessing_Staging_Websites

This solution forces firefox to use a specified DNS server. It works by using `firejail`, which is a tool for locking firefox into a security-restricted sandbox. I use it, for example, in the article I wrote for creating a Facebook-specific sandboxed browser:

* https://tech.michaelaltfield.net/2019/03/26/ephemeral-firefox-as-a-site-specific-browser-03/

In this case, we're using firejail to force firefox to use osedev1 as our DNS server. I think this solution would be better for you for a few reasons:

It won't change your system's DNS to rely on a server that's only accessible through the VPN, which may break your network connection once you disconnect from the VPN

It doesn't rely on the system's DNS, which may change unexpectedly causing you to make changes to production when you think you're making changes to staging (or vice-versa). The firejail solution will force firefox to use osedev1 as your DNS server, effectively ensuring that you'll be on staging and not production.

It only affects a single instance of firefox. This way you can open a non-firejail'd browser and access production in one window and staging in another window.

Cheers, Michael Altfield Senior System Administrator