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

Sean Cody sean at tinfoilhat.ca
Tue Jun 2 16:53:13 CDT 2020

That last link was helpful... their solution is very similar to the direction I was headed but pulling data from system (interesting approach).
If I get around to porting it I'll pop as gist here or something.


-----Original Message-----
From: Adam Thompson <athompso at athompso.net> 
Sent: June 2, 2020 4:43 PM
To: Continuation of Round Table discussion <roundtable at muug.ca>
Cc: Sean Cody <sean at tinfoilhat.ca>
Subject: Re: [RndTbl] Fix resolv.conf on WSL instantiation...

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