Commands homelab








Command to create rules run on windows2008int

netsh advfirewall reset

netsh interface portproxy reset

nestsh advfirewall firewall add rule name="Lab3-rule3389" protocol=TCP dir=in localport=3389 action=allow

nestsh advfirewall firewall add rule name="Lab3-rule21" protocol=TCP dir=in localport=21 action=allow

nestsh advfirewall firewall add rule name="Lab3-rule23" protocol=TCP dir=in localport=23 action=allow

nestsh advfirewall firewall add rule name="Lab3-rule80" protocol=TCP dir=in localport=23 action=allow

nestsh advfirewall firewall add rule name="Lab3-rule500UDP" protocol=UDP dir=in localport=500 action=allow

nestsh advfirewall firewall add rule name="Lab3-rule4500UDP" protocol=UDP dir=in localport=4500 action=allow




Command to create rules run on windows8int

netsh advfirewall reset

netsh interface portproxy reset

nestsh advfirewall firewall add rule name="Lab3-rule3389" protocol=TCP dir=in localport=3389 action=allow

nestsh advfirewall firewall add rule name="Lab3-rule145" protocol=TCP dir=in localport=145 action=allow

nestsh advfirewall firewall add rule name="Lab3-rule445" protocol=TCP dir=in localport=445 action=allow



Command to create rules run on Sniffer

netsh advfirewall reset

netsh interface portproxy reset

netsh interface portproxy add v4tov4 listenport=8090 listenaddress=216.1.1.1 connectport=3389 connectaddress=192.168.1.100

netsh advfirewall firewall add rule name=”Lab3-rdprule8090” protocol=TCP dir=in localip=216.1.1.1 localport=8090 action=allow



netsh interface portproxy add v4tov4 listenport=8091 listenaddress=216.1.1.1 connectport=3389 connectaddress=192.168.1.200

netsh advfirewall firewall add rule name=”Lab3-rdprule8091” protocol=TCP dir=in localip=216.1.1.1 localport=8091 action=allow


netsh interface portproxy add v4tov4 listenport=8080 listenaddress=216.1.1.1 connectport=80 connectaddress=192.168.1.100

netsh advfirewall firewall add rule name=”Lab3-rdprule8080” protocol=TCP dir=in localip=216.1.1.1 localport=8080 action=allow


netsh interface portproxy add v4tov4 listenport=8221 listenaddress=216.1.1.1 connectport=21 connectaddress=192.168.1.100

netsh advfirewall firewall add rule name=”Lab3-rdprule8221” protocol=TCP dir=in localip=216.1.1.1 localport=8221 action=allow


netsh interface portproxy add v4tov4 listenport=8223 listenaddress=216.1.1.1 connectport=23 connectaddress=192.168.1.100


netsh advfirewall firewall add rule name=”Lab3-rdprule8223” protocol=TCP dir=in localip=216.1.1.1 localport=8223 action=allow



Block SSH from BT5int to BT5ext


Sudo iptables -A OUTPUT -p tcp -d 216.1.1.100 –dport 22 -j REJECT

Block IMCP on Windows firewall

netsh advfirewall firewall add rule name="Block ping inbound" protocol=imcpv4:8,any dir=in action=block





Comments

Popular posts from this blog

List, Typle and Set in python

Wifi on ubuntu server