After a few hours of struggling to get my Samsung G9 monitor to “find update files” in order to flash a newer firmware I decided to make a post listing everything that you need to do ‘end-to-end’ to get a new firmware flashed on this device.
Continue readingCategory Archives: Troubleshooting
How to setup dual-stack IPv4 IPv6 Azure VM without a load-balancer
I wanted to document my Microsoft Azure saga in getting a public IPv6 address to work in a virtual machine without a load balancer in front of it. My needs were pretty simple and straightforward I wanted a virtual server that had a static IPv4 and IPv6 public addresses so that I can monitor my home network and other websites.
You would think this would be pretty easy, a few clicks and done? That wasn’t my experience on Azure and setting this up isn’t easy nor straightforward. Below is how to get it done, if this helps you – you can buy me a coffee or beer.
Continue readingPosted in Blog, Cloud, Linux, Technology, Troubleshooting, Virtualization
Tagged azure, cloud, dual stack, ipv6, networking, virtual server, virtualization, vm, vmnet
Linux IPv6 command cheatsheet
This post is intended to be a quick note to self on linux IPv6 commands, for quick reference when needed.
# Find the route decision for a given address.
ip route get 2a00:1450:4001:820::200e
ip -6 route
route -A inet6 (apt-get install net-tools) # equivalent to netstat -rn -A inet6
netstat -A inet6 -rn
netstat -r
ip -6 route show table 51820
ip -6 neigh
ip -6 neigh show proxy
# DHCPv6 release / renew
dhclient -6 -r ens18
dhclient -6 ens18
# Flush IPv6 neighbors cache
ip -family inet6 neigh flush any
# Find the route decision for a given address.
ip route get 2a00:1450:4001:820::200e
# Request a router advertisement (apt-get install -y ndisc6)
rdisc6 eth0
# Perform a Neighbor Solicitation (arp IPv4 equivalent) (apt-get install -y ndisc6)
ndisc6 2001:db8::42 eth0
# ping multicast address to have all link-local hosts to respond.
ping ff02::1%eth0
Good articles about IPv6:
- IPv6 range blocks
- IPv6 unicast, anycast, multicast – well known addresses.
Troubleshooting tools:
- IPv6 ping from multiple locations.
Bonus section ‘ufw’ firewall
Check status of firewall and enable or disable.
# ufw status
# ufw enable
# ufw disable
View firewall rules and number to delete a specific rule.
# ufw status verbose
# ufw status numbered
Delete a firewall rule (from number of last cmd)
# ufw delete 12
Rules needed to allow IPv6 routing via wireguard to endpoint (no iptables forwarding would be needed on IPv6 as the other peer carries the public IP – they also should implement a firewall before using the below command!)
# ufw route allow in on eth0 out on wghub to 2602:xxx:730b:xxx:cafe::12
IPv4 firewall and routing rule to open Plex Media Server port 32400 and internal IPv4 space of wireguard peer.
# ufw allow in on eth0 out on wghub to 10.100.100.11 port 32400
# ufw route allow in on eth0 out on wghub to 10.100.100.11 port 32400
Add rule and get logs for matches of that rule:
# ufw allow log proto any from any to 192.168.1.x
View logs:
# tail -f /var/log/ufw.log
Extra bonus iptables NAT forwarding
On VPS (public endpoint) forward IPv4 traffic on tcp/32400 to wireguard peer. (recall IPv6 doesn’t need a rule)
# iptables -A PREROUTING -t nat -i eth0 -p tcp –dport 32400 -j DNAT –to 10.100.100.11:32400
Test your port forwards
For IPv6 I use:
http://www.ipv6scanner.com/cgi-bin/main.py
Fix ZFSonLinux pool auto expanding
If you’re having issues with zfsonlinux and your pool not expanding after replacing your hard drives with larger ones then here is a trick to fix it. Continue reading
Scheduled task to reset wireless network adapter after hibernate on Windows
One of my Edimax wireless adapters fails to resume network connectivity when restoring the system from hibernation.
So I created a scheduled task that resets the device, after resuming from hibernate open your Event Viewer > System.
Look for event ID 27 – “The boot type was 0x2.” right click “Attach task to this event”
Run program: powershell.exe
Arguments: Restart-NetAdapter -InterfaceDescription ‘Edimax AC1750 Wi-Fi USB Adapter’ -Confirm:$false
This should fix the issue automatically after every reboot. Your interface description may be different, in powershell run “Get-NetAdapter” to get the device’s specific and edit the arguments above as needed.
Fix zfs-mount.service failing after reboot on Proxmox
In my new homelab migration to Proxmox I came across a bug that will prevent you from being able to mount all your ZFS mount points and be a pain in the ass even more if you host containers in that folder.
Continue reading
Posted in Linux, Proxmox, Technology, Troubleshooting, Virtualization
Tagged containers, proxmox, zfs
Allow non-root processes to bind to privileged (ports <1024) on linux
As I work on my homelab migration from FreeNAS into Linux containers, I need to move my freebsd jails to LXC.
In *nix any usage of well-known ports (aka 1024 or less) requires special privileges or a kernel setting. In FreeBSD a simple sysctl net.inet.ip.portrange.reservedhigh =1 was enough to allow the BSD jail to use any port on the jail.
On LXC, I had to figure out how to do the same thing and its quite different. My environment is a debian stretch LXC container but should work on other linux versions.
# apt-get install libcap2-bin
# setcap 'cap_net_bind_service=+ep' /usr/bin/transmission-daemon
In the example above, the binary /usr/bin/transmission-daemon is now able to open any port, or port 80 http in my case all while running a service as a non-root user.
Hopefully these helps folks out there, the answer took some digging but I already had an idea on what was needed thanks to my FreeBSD experience in zones 🙂
Posted in Linux, Troubleshooting, Virtualization
Tagged containers, debian, networking, proxmox
FreeBSD/FreeNAS USB_ERR_TIMEOUT fix
As I prepare my migration to my new Debian ZFS system I wanted to backup my zpool onto an external 8TB hard drive. I came across this issue where after plugging in the external USB 3.0 hard drive it would loop and not work:
Troubleshooting networking issues after fresh install of proxmox VE 4.4
Writing a quick troubleshooting guide and informative post to address an issue I came across when installing Proxmox VE 4.4 on two of my machines.
On servers with more than two network interfaces Debian/Proxmox renames all interfaces and does not properly detect eth0 as the on-board ethernet as many other linux flavors. This may cause a mild headache if you just installed Proxmox with static IP addresses using the installer and upon reboot you can’t access any network resources. Continue reading
Posted in Guides, Linux, Proxmox, Troubleshooting
Tagged debian, networking, proxmox, troubleshooting
Configure Webstorm to use Github Desktop for Windows git-bash
If you have installed Github Desktop on Windows, you may have noticed that the application itself comes with a “Git Shell” which is basically a linux terminal emulator running on windows and its very useful for developers or linux users that are familiar with bash.
The problem I recently encountered was trying to find the executable PATH of the git-bash.exe so that I can configure my Webstorm IDE to use it. All the documentation on the internet seems to point to C:/Program Files/Git folder but Github may have changed this as in the latest release I downloaded (v 3.3.3.0) the files reside elsewhere and I will share where to find them.
Continue reading