[RndTbl] Fix resolv.conf on WSL instantiation...

Adam Thompson athompso at athompso.net
Tue Jun 2 16:42:47 CDT 2020

You're not going to like the official solution: 

The various "solutions" are mostly going to be problematic, because 
apparently it's a bug: 

However, there's hope: 

At least it's widely known: 

Good luck!


On 2020-06-02 16:19, Sean Cody wrote:
> I must be having a rough week or just getting older but I can’t seem
> to come up with an elegant solution to this problem…
> Ok… I have WSL on my workstation, when I establish VPN to $work, WSL
> buggers resolv.conf.
> From:
> nameserver <mine>
> search <$homedomain>
> To:
> nameserver <mine>
> nameserver <$work1>
> nameserver <$work2>
> search <$workdomain>
> I have to manually take line 1 and move it to line 3 for internal
> resolution to work…  EVERY DAMNED TIME WSL instantiates (while VPN is
> established).
> This is because $workdomain is blackholed publicly.
> My first thought was a stupid ed script to move line 1 to 3… that
> didn’t work so well (my ed skills are apparently lacking).
> Ideally the solution would note if there 3 or more nameserver lines,
> move the lines before ‘nameserver <$work1>’ to one line before the
> last file.
> I’d pop that into my .bashrc/.profile or similar.
> I couldn’t find how WSL manipulates the file itself otherwise I would
> have tried to change it…
> Anyone have any ideas there?
> --
> Sean
> _______________________________________________
> Roundtable mailing list
> Roundtable at muug.ca
> https://muug.ca/mailman/listinfo/roundtable

More information about the Roundtable mailing list