Skip to content

Commit

Permalink
content-update
Browse files Browse the repository at this point in the history
  • Loading branch information
BitwiseOperator committed Jul 15, 2024
1 parent fc63ac9 commit 3e7d376
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 10 deletions.
4 changes: 2 additions & 2 deletions docs/Knowledge_Base/Home_Lab/Portainer_Docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""
Expand Down
50 changes: 47 additions & 3 deletions docs/Knowledge_Base/OS/Linux/Debian/Commands/DNS_Lookup.md
Original file line number Diff line number Diff line change
@@ -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]
```
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""
Expand Down Expand Up @@ -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
```

Expand All @@ -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
Expand Down Expand Up @@ -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
```

0 comments on commit 3e7d376

Please sign in to comment.