vernon.wenberg.net

18.04 to 20.04 Upgrade Notes

  • Upgrading might break your local resolver, DNSMasq. When you issue the command systemctl status dnsmasq, you might get an error that looks something like, dnsmasq: cannot access /etc/dnsmasq.d/lxd: No such file or directory. DNSMasq does not start because it cannot find this file. This file is simply a dangling symlink that needs to be removed, rm /etc/dnsmasq.d/lxd.
· 2020/04/27 08:02 · 2020/04/27 08:02

Fix DNS after upgrading to Ubuntu Server 20.04

The way DNS is configured in Ubuntu has become overly complicated in the last few versions. Instead of configuring /etc/network/interfaces, it is now configured using Netplan. But sometimes that doesn't even work because DNS is ultimately controlled by systemd-resolv. systemd-resolv generates /etc/resolv.conf and the default stub DNS uses a local resolver to resolve DNS hostnames. For some reason, after upgrading to Ubuntu 20.04 from 18.04, the local resolver was not started or installed. To fix this, you can't just edit /etc/resolv.conf, you must add your custom DNS servers in /etc/resolvconf/resolv.conf.d/head shown in the image below.

Restart the system and your custom DNS servers should stick.

· 2020/04/27 04:36 · 2020/04/27 04:36

Disable IPV6 in Ubuntu 18.04

IPV6 sometimes break DNS resolution in Ubuntu 18.04. Follow the steps below to disable and verify that IPV6 is disabled in Ubuntu.

Edit /etc/sysctl.conf and add the following lines to the end of the file …

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

Save the file and issue the following command to force Ubuntu to reload the file.

sysctl -p

To verify that the new configuration has been applied, you can issue the next command.

cat /proc/sys/net/ipv6/conf/all/disable_ipv6

You should receive a result of 1 if it was successfully applied and 0 if it failed.

· 2020/04/12 10:32 · 2020/04/12 10:33

Create a .pfx/.p12 Certificate File Using OpenSSL

Source: https://www.ssl.com/how-to/create-a-pfx-p12-certificate-file-using-openssl/

The PKCS#12 or PFX format is a binary format for storing the server certificate, any intermediate certificates, and the private key into a single encryptable file. PFX files are usually found with the extensions .pfx and .p12. PFX files are typically used on Windows and macOS machines to import and export certificates and private keys.

→ Read more...

· 2020/02/19 20:13 · 2020/02/19 20:13

Quick reverse proxy config for nginx

nginx is my preferred lightweight HTTP/HTTPS server and fairly easy to do reverse proxy for. In this example, I use a reverse proxy to expose an internal service running on port 82 to the Internet.

Here is an example config …

server {
        server_name example.vernon.wenberg.net; # must match the sub.host portion of the URL
        proxy_set_header Host   $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        client_max_body_size 100M; # increase size of uploaded files
        location / {
                proxy_pass http://internal-service.vernon.wenberg.net:82; # internal server address and port
        }
# Insert SSL certificate block here
}

example.vernon.wenberg.net is a sub-domain that exists on the public Internet while internal-service.vernon.wenberg is an internal system. This also allows the use of an SSL certificate on your nginx server instead of your internal server.

· 2020/02/16 23:59 · 2020/02/17 00:11

Older entries >>

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International