Check Linux VM's network connections

1. root@linux:/# cat /etc/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "systemd-resolve --status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
search 6e857bc1-b353-4193-8cc6-d8be8f7b24d1.internal.lnv4.azurestack.local

2. root@linux:/# nslookup -debug google.com
Server:         127.0.0.53
Address:        127.0.0.53#53

Non-authoritative answer:
Name:   google.com
Address: 172.217.12.78
Name:   google.com
Address: 2607:f8b0:4000:816::200e

3. root@linux:/# host google.com
google.com has address 172.217.12.46
google.com has IPv6 address 2607:f8b0:4000:816::200e
google.com mail is handled by 40 alt3.aspmx.l.google.com.
google.com mail is handled by 20 alt1.aspmx.l.google.com.
google.com mail is handled by 50 alt4.aspmx.l.google.com.
google.com mail is handled by 30 alt2.aspmx.l.google.com.
google.com mail is handled by 10 aspmx.l.google.com.

3. root@linux:/# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         10.0.0.1        0.0.0.0         UG        0 0          0 eth0
10.0.0.0        0.0.0.0         255.255.255.0   U         0 0          0 eth0
169.254.169.254 10.0.0.1        255.255.255.255 UGH       0 0          0 eth0

4. root@linux:/# nmap 127.0.0.53

Starting Nmap 7.60 ( https://nmap.org ) at 2019-04-02 02:26 UTC
Nmap scan report for localhost (127.0.0.53)
Host is up (0.0000040s latency).
Not shown: 998 closed ports
PORT   STATE SERVICE
22/tcp open  ssh
53/tcp open  domain

Nmap done: 1 IP address (1 host up) scanned in 1.64 seconds

5. root@linux:/# telnet 127.0.0.53 22
Trying 127.0.0.53...
Connected to 127.0.0.53.
Escape character is '^]'.
SSH-2.0-OpenSSH_7.6p1 Ubuntu-4
Protocol mismatch.
Connection closed by foreign host.

6. root@linux:/# ping -q -w1 -c1 google.com &>/dev/null && echo online || echo offline
online

Comments

Popular posts from this blog

ADFS WAP: How to configure SSO with RDWeb

Collect AzureStack Update Verbose log

Secure RDWeb using Azure Multi-Factor Authentication