-
Notifications
You must be signed in to change notification settings - Fork 0
/
report.sh
executable file
·45 lines (27 loc) · 856 Bytes
/
report.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
USER="me"
# Report - can be called separately
printf "\n\033[1m\033[33mPost-Install Report\n"
## Show Local IP
printf "\nLocal IP addresses -\n"
ip -4 addr show | grep -oP '(?<=inet\s)\d+(\.\d+){3}'
## Show Remote IP
printf "\nRemote (public) IP address -\n"
wget -qO - icanhazip.com
## Show Gateway
printf "\nGateway addresses -\n"
ip r | grep default
## Show DNS
printf "\nDNS addresses -\n"
grep "nameserver" /etc/resolv.conf
## Show Temp Hostname / Intranet connection file name
printf "\nLocal Hostname\n" # expected jc-AUTOSSHPORT
hostname
## Show AutoSSH & Zabbix Ports
printf "\nAutoSSH & Zabbix Ports\n"
cat /home/$USER/install/openportlist.txt
## Notes
printf "\nNo Local IP = not connected to the network\n"
echo "No Remote IP = not connected to the Internet"
echo "No Ports = Couldn't contact the Target"
tput sgr0