Networking
DNS Tools
Windows Linux To list TXT record: dig TXT talkingwithrebecca.com @dns4.registrar-servers.com FreeBSD About hostname: host hostname To list TXT record type for \_amazonses hostname using @dns1 nameserver: drill txt _amazonses.gnezdovi.com @dns1.registrar-servers.com Reverse Lookup Name from IP: drill -x 24.16.122.177 Mac OS X List TXT record: nslookup -type=TXT _amazones.gnezdovi.com dns1.registrar-servers.com. Clear DNS cache: sudo killall -HUP mDNSResponder
Netmask
Easy explanation of netmask. Visual reference: Class Address # of Hosts Netmask (Binary) Netmask (Decimal) CIDR /4 240,435,456 11110000 00000000 00000000 00000000 240.0.0.0 CIDR /5 134,217,728 11111000 00000000 00000000 00000000 248.0.0.0 CIDR /6 67,108,864 11111100 00000000 00000000 00000000 252.0.0.0 CIDR /7 33,554,432 11111110 00000000 00000000 00000000 254.0.0.0 A /8 16,777,216 11111111 00000000 00000000 00000000 255.0.0.0 CIDR /9 8,388,608 11111111 10000000 00000000 00000000 255.128.0.0 CIDR /10 4,194,304 11111111 11000000 00000000 00000000 255.
Ports
Listening Ports Find Out What Ports Are Listening / Open On My Linux & FreeBSD Server Various Ways to List Ports on Linux. Option #2 works on barebones machine. Option #2 for barebones machine: sudo ss -lntu Port Binding Applies to: “Ubuntu 16.04 LTS” Ubuntu 16 Linux uses authbind application to control which non-root users can bind on <1000 port numbers. Use the following procedure to add new application-port registration.
Remote Editing with rmate
rmate utility was originally created on Mac OS X by TextMate editor. It allows user to edit file on remote system over SSH protocol. Today we can see find multiple implementations of rmate using different languages. Many editors support this protocol including Visual Studio Code and Sublime. I prefer shell based implementation, because it does not have additional dependencies. Original GitHub instructions. To install shell version: wget -O /usr/sbin/rmate https://raw.github.com/aurora/rmate/master/rmate --no-check-certificate sudo chmod a+x /usr/sbin/rmate For standard SSH: