Tag Archives: port

IPTables blocking outbound port to specific host. | centos redhat linux iptables outbound port block drop dport ip

I needed to write a iptables rule to block outbound traffic to a specific host here.

Now I need to write a similar rule which will not block the entire host but just a single port to a host.

The rule is very simlar to the previously state but with the port flag, see below.

 

Network scanning using Netcat

I started a windows vm on my network which I needed RDP access to, I didnt know its IP address. I could have used Nmap but it was not installed so I decided to use Netcat instead.

I have not had a chance to test it but network scanned my entire subnet in 2.5 minutes.

So the above command with scan each IP in the submit and probe port 3389 (RDP) to see if its open, if it is it will display the IP.