Information Technology Grimoire

Version .0.0.1

IT Notes from various projects because I forget, and hopefully they help you too.

Host Firewalls

Windows Firewall

wf.msc

netsh advfirewall set currentprofile logging filename %systemroot%\system32\LogFiles\Firewall\pfirewall.log
netsh advfirewall set currentprofile logging droppedconnections enable
netsh advfirewall set currentprofile logging allowedconnections enable

netsh advfirewall set  currentprofile state off
netsh advfirewall set  currentprofile state on
netsh advfirewall show allprofiles
netsh -r computername advfirewall show allprofiles
netsh -r computername advfirewall set publicprofile state on

FOR /L %i IN (1,1,254) DO netsh -r 192.168.1.%i advfirewall show allprofiles >192.168.1.%i.firewallstate.txt

Linux

sudo iptables -L
sudo ufw status verbose
sudo ufw status numbered
sudo cat /var/log/syslog | grep "x.x.x.x"