Restart network on Ubuntu 22.04
sudo ip link set enp0s3 down sudo ip link set enp0s3 up
sudo nmcli networking off sudo nmcli networking on
References
https://linuxconfig.org/how-to-restart-network-on-ubuntu-22-04-lts-jammy-jellyfish
sudo ip link set enp0s3 down sudo ip link set enp0s3 up
sudo nmcli networking off sudo nmcli networking on
References
https://linuxconfig.org/how-to-restart-network-on-ubuntu-22-04-lts-jammy-jellyfish
sudo passwd
sudo nano /etc/gdm3/custom.conf
Inside the GDM configuration file, we need to add the AllowRoot=true
line. After you have made this change, you can save and exit the file.
AllowRoot=true
sudo nano /etc/pam.d/gdm-password
Inside of the PAM authentication daemon file, comment out the following line, which denies root access to the graphical user interface, with a pound sign #
. You can save your changes and exit this file when done.
auth required pam_succeed_if.so user != root quiet_success
reboot
References
https://linuxconfig.org/how-to-allow-gui-root-login-on-ubuntu-22-04-jammy-jellyfish-linux
nano /etc/netplan/00-installer-config.yam
network: ethernets: enp0s3: addresses: - 10.66.10.7/16 dhcp4: false routes: - to: default via: 10.66.10.1 nameservers: addresses: - 8.8.8.8 - 8.8.4.4 search: - workgroup version: 2
sudo netplan try
sudo netplan apply
References
https://technologyrss.com/how-to-configure-static-ip-address-on-ubuntu-22-04/
sudo nano /etc/default/ufw
Change the line that says: IPV6=yes
to IPV6=no
then restart the ufw service. You can even run sudo ufw reload
if the ufw instance is already enabled.
References
https://serverfault.com/questions/809643/how-do-i-use-ufw-to-open-ports-on-ipv4-only
sudo pacman -S dotnet-sdk
sudo pacman -S aspnet-runtime
Then, you’ll need to create /etc/profile.d/dotnet.sh
and add the following:
export DOTNET_ROOT=/usr/share/dotnet
export MSBuildSDKsPath=$DOTNET_ROOT/sdk/$(${DOTNET_ROOT}/dotnet --version)/Sdks
export PATH=${PATH}:${DOTNET_ROOT}
dotnet --list-sdks
To use the extra tools, such as dotnet ef
, you will want to add a line to your .bashrc
file.
nano ~/.bashrc
And add the following at the end:
export PATH="$PATH:/home/jeremy/.dotnet/tools"
source ~/.bashrc
References
https://www.jeremymorgan.com/tutorials/linux/how-to-install-dotnet-manjaro/
https://github.com/dotnet/core/issues/7087
sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
To make the change permanent open the /etc/fstab
file and append the following line:
/swapfile swap swap defaults 0 0
sudo swapon --show
sudo free -h
References
https://linuxize.com/post/create-a-linux-swap-file/
Get a root shell
sudo -s
check what else is possibly already listening to port 53
ss -lp 'sport = :domain'
systemctl stop systemd-resolved systemctl disable systemd-resolved
ss -lp 'sport = :domain'
Download and run dnscrypt-proxy
Download dnscrypt-proxy here: dnscrypt-proxy binaries.
cp example-dnscrypt-proxy.toml dnscrypt-proxy.toml
./dnscrypt-proxy
Change the system DNS settings
apt-get remove resolvconf
cp /etc/resolv.conf /etc/resolv.conf.backup
rm -f /etc/resolv.conf
And create a new /etc/resolv.conf
file with the following content:
nameserver 127.0.0.1 options edns0
Install the proxy as a system service
./dnscrypt-proxy -service install
./dnscrypt-proxy -service start
./dnscrypt-proxy -service stop
./dnscrypt-proxy -service restart
./dnscrypt-proxy -service uninstall
Want to check that DNS resolution works?
./dnscrypt-proxy -resolve example.com
Connect to 1.1.1.1 using DoH clients
Add cloudflare
and cloudflare-ipv6
to the server list in dnscrypt-proxy.toml
:
server_names = ['cloudflare', 'cloudflare-ipv6']
References
https://github.com/DNSCrypt/dnscrypt-proxy/wiki/Installation-linux
https://developers.cloudflare.com/1.1.1.1/encryption/dns-over-https/dns-over-https-client/
The hosts file is a way to map hostnames to IP addresses. This is very important with certain setups and to make networking on Linux a bit easier. In a sense, the hosts file acts as a local DNS server.
sudo nano /etc/hosts
For example, to block Wikipedia, you’d type (remembering to use the Tab key rather than Space):
127.0.0.1 wikipedia.org
or static dns lookup for hostnames
198.20.14.51 example.com
References
https://www.makeuseof.com/tag/modify-manage-hosts-file-linux/
The reason is if you “shutdown” does not actually shut down most of the time in Windows, but only hibernates.
Unmount the Ntfs partition by running
sudo umount -a
to get the partition to mount with full read/write access
sudo ntfsfix /dev/sdaxx #(for example /dev/sda3)
References
https://superuser.com/questions/1394263/ntfs-file-system-read-only-by-ubuntu-remount-doesnt-work
dig a google.com
dig a google.com +short @8.8.8.8
References
https://superuser.com/questions/152576/how-to-get-all-ips-of-a-domain
https://superuser.com/questions/847575/how-do-i-find-all-known-ips-for-a-given-domain-in-linux