diff --git a/docs/Knowledge_Base/Home_Lab/Portainer_Docker.md b/docs/Knowledge_Base/Home_Lab/Portainer_Docker.md index ff2f00fa5..f172cf7da 100644 --- a/docs/Knowledge_Base/Home_Lab/Portainer_Docker.md +++ b/docs/Knowledge_Base/Home_Lab/Portainer_Docker.md @@ -22,9 +22,9 @@ docker ps ``` - Log in https://localhost:9443 + Log in [https://localhost:9443](https://localhost:9443) - Sources: [Docker Linux Install CE](https://docs.portainer.io/start/install-ce/server/docker/linux) + **Sources**: [Docker Linux Install CE](https://docs.portainer.io/start/install-ce/server/docker/linux) !!! info "" diff --git a/docs/Knowledge_Base/OS/Linux/Debian/Commands/DNS_Lookup.md b/docs/Knowledge_Base/OS/Linux/Debian/Commands/DNS_Lookup.md index 181a66a0f..863a0c01e 100644 --- a/docs/Knowledge_Base/OS/Linux/Debian/Commands/DNS_Lookup.md +++ b/docs/Knowledge_Base/OS/Linux/Debian/Commands/DNS_Lookup.md @@ -1,10 +1,54 @@ !!! info "" - ### DNS Lookup + ### Installing dnsutils ```bash - dig -v sudo apt-get install dnsutils + ``` + + ### dnsutils Tools + + When installing dnsutils, you will be able to use the following commands + + - 'dig' + - 'nslookup' + - 'nsupdate' + + ### Command syntax + + #### dig + + ```bash + dig [server] [name] [type] + dig [@server] [-b address] [-c class] [-f filename] [-k filename] [-m] [-p port#] [-t type] [-x addr] [-y name:key] [-4] [-6] [name] [type] [class] [queryopt...] + + dig example.com + dig example.com MX + dig example.com SOA + dig example.com TTL + dig example.com ANY +noall +answer + + #reverse lookup + dig -x 1.1.1.1 +short - #dig [server] [name] [type] + ``` + + #### nslookup + + ```bash + nslookup [-option] [name | -] [server] + + nslookup example.com + nslookup -query=mx example.com + nslookup -type=soa example.com + nslookup -type=any example.com + nslookup -timeout=10 example.com + nslookup -port 56 example.com + nslookup -debug example.com + ``` + + #### nsupdate + + ```bash + nsupdate [-d] [[-y keyname:secret] | [-k keyfile]] [-t timeout] [-u udptimeout] [-r udpretries] [-v] [filename] ``` diff --git a/docs/Knowledge_Base/OS/Linux/Debian/Commands/Networking_VLAN_and_Route.md b/docs/Knowledge_Base/OS/Linux/Debian/Commands/Networking_VLAN_and_Route.md index 6b2ccdcb9..5a43850b4 100644 --- a/docs/Knowledge_Base/OS/Linux/Debian/Commands/Networking_VLAN_and_Route.md +++ b/docs/Knowledge_Base/OS/Linux/Debian/Commands/Networking_VLAN_and_Route.md @@ -59,8 +59,8 @@ #### Network configuration files locations ```bash - nano /etc/NetworkManager/NetworkManager.conf - nano /etc/network/interfaces + sudo nano /etc/NetworkManager/NetworkManager.conf + sudo nano /etc/network/interfaces ``` !!! info "" @@ -239,10 +239,10 @@ ##### Route ADD + dev syntax depends on how you have those devices set up. You can check by using 'nmcli conn show' + ```bash sudo route add -net 0.0.0.0 gw 172.20.0.1 dev VLAN50 - sudo route add -net 0.0.0.0 gw 172.20.0.1 dev VLAN200 - sudo route add -net 0.0.0.0 gw 172.20.0.1 dev eth0.35 sudo route add -net 0.0.0.0 gw 172.20.0.1 dev eth0.50 ``` @@ -262,7 +262,8 @@ 172.20.0.0 0.0.0.0 255.255.240.0 U 400 0 0 VLAN50 ``` - Table should look like this, if green is missing then if you delete the eth0 route, you can’t reach the device + Table should look like this. If you want to delete the eth0 default route so you can force all traffic on a VLAN, you will lose connectivity to the device. + In most cases you can regain access if you bounce the Switch port the device is connected to (Disable > wait a few seconds > Enable). ```bash route -n @@ -335,3 +336,16 @@ #while in /etc/netplan/ sudo netplan apply ``` + +!!! info "" + + #### extra commands + + ```bash + cat /proc/net/route + ip route + ip route get x.x.x.x + ip route show table local + #policy-based routing + ip rule show + ```