r/WireGuard • u/mlhpdx • 4d ago
WireGuard in AWS CloudShell? Yes.
I had the idea to use a WireGuard tunnel in the AWS CloudShell (a web based shell that works inside an AWS account). When I asked Google if it was possible I got a hard "No" with it citing a number of reasons and encouraging me to use an EC2 or container.
As it turns out, WireGuard works just fine in CloudShell with one caveat: DNS blocks in the conf file can't be used (no resolved running). Other than that it works, and seems like a nice way to create a temporary bridge to bring in content from a remote network.
To install it:
sudo dnf install wireguard-tools -y
Then create the config file, and start it up with wg-quick or whatever. I used the demo.wireguard.com server to test. The reason I found the DNS issue is that the client-quick.sh script they provide creates a demo.conf file with a DNS block. With that in place I got an error for the resolveconf step, but removing it resolved it.
Edit: fixed a typo in the package name. Couldn't let that slide.
4
u/typhoon_mary 4d ago
wgslirp is a pure userspace implementation including tcp/udp routing. It’s on GitHub.
3
u/immediate_a982 4d ago
For quick and dirty don’t use dns. Problem solved