this post was submitted on 12 Jan 2024
25 points (100.0% liked)

Selfhosted

40132 readers
683 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
25
submitted 10 months ago* (last edited 10 months ago) by [email protected] to c/[email protected]
 

I recently decided to switch to proper wireguard instead of tailscale and finally be fully opensource on my home server, however, when I uninstalled Tailscale I lost internet on the server. I've tried editing the resolv.conf and rebooting a couple times but I can't find anything else and I am square out of ideas. Has anyone experienced this and know a fix? My main server is running ubuntu server 23.10.

Editing this to say I'm dumb and anyone who has this issue in the future. I ran netplan try and it fixed itself.

top 6 comments
sorted by: hot top controversial new old
[–] [email protected] 8 points 10 months ago

This is not helpful for you now, but you should look into etckeeper, it creates a git repo of your /etc directory, it hooks into APT and will create new commits when changes occur. It's not often that i use it, but it's reassuring to know that i have a history of the contents of /etc

With all networking problems it's a process of elimination, so you'll want to first figure out what problem you are facing.

  • can you ping your local router? (maybe it's 192.168.1.1)
  • can you ping the internet? (maybe try 8.8.8.8)

if those both work then you should move on to DNS, if they don't then you'll have to jump to trying to figure out what is wrong with your network devices

dns

To debug DNS issues, you can compare the output of running

getent hosts google.com

to something like

nslookup google.com 8.8.8.8

one will use an explicit DNS server (8.8.8.8) and the other is using the resolv conf configuration. if they both work and have somewhat similar output, then it's not DNS if the getent command fails, then you have a DNS issue.

If you have a problem with the contents of resolv conf, or it's not working, you'll first need to figure out which DNS configuration process you are using, it's probably either network manager, or systemd-resolved. I'm no expert in either, but once you know that you can start looking into how that system is configured.

networking

If it's not DNS then you need to figure out how your networking device is configured. Check that the networking systemd processes started is a good place to start, but you'll have to figure out what you are using for network configuration.

for server style /etc/network/interfaces configuration

sudo systemctl status networking.service

for network manager

sudo systemctl status NetworkManager.service
[–] [email protected] 3 points 10 months ago

I had a similar issue too. Tailscale messed up my resolv.conf and I rebuilt it to get basic dns working.

What I would do is look for a basic dns tutorial for Ubuntu to ensure either the local or remote dns server is working. Before you do that verify the internet is working by pinging something like 1.1.1.1 or 8.8.8.8 just as a sanity test. If that works then DNS is the last thing to get going.

[–] [email protected] 3 points 10 months ago

This is another reason about why I tend to run everything in a docker container

[–] [email protected] 3 points 10 months ago

FYI I've had a really good experience with using Headscale for a true open-source Tailscale experience. It helps that the Tailscale clients work with it too and that Tailscale (very unofficially) help support it.

[–] [email protected] 2 points 10 months ago

By using regular wireguard you are creating a hub and spoke network that will not have nearly the performance. Try netbird as it can be self hosted and it uses wireguard+webRTC among other things.

[–] [email protected] 1 points 10 months ago

Are you editing resolv.conf directly or linking it to /run/... I forget the rest of the path.