Categories
Networking

Opening a port on Mac

You could open a port by listening to the port

nc -l [PORT NUMBER]

Considering port is 500,

nc -l 500
Categories
Networking

Routing Basic Commands

sudo route add 192.168.1.0/24 [DEFAULT GATEWAY]
sudo route add 192.168.1.0/24 192.168.1.1

Debug Routing

netstat -nr

Mac

ifcoufig

Windows

ipconfig -all
Categories
Networking

Juniper SRX Factory reset

root@host# load factory-default
root@host# set system root-authentication plain-text-password
New password:
Retype new password:
root@host# commit check
root@host# commit
Categories
Networking

ifconfig basic commands

Basic Usage

ifconfig

Interface Information

ifconfig [INTERFACE]
ifconfig en1

Assigning IP Address to Interface

ifconfig en1 192.168.1.2

Assigning Netmask to Interface

ifconfig en1 192.168.88.25 netmask 255.255.255.0

Netmask

netmask 0xffffff00 means 255.255.255.0
Categories
Linux

Find files Linux commands

Search zip files

find . -type f -name '*.zip' -exec du -ch {} + | sort -h -r | head -n 20

Search folders with large size

du -a * | sort -n -r | head -n 20