1.

Solve : IP block to Win7 FireWall?

Answer»

Hello
i did create rule WINDOWS FireWall for inbound (Win7)
i wanna block some ip list for hack
(whats doing ?
checking host & directories - files for include shell)

i have ip.txt text file for will block ip list and created rule name Block_IP in firewall
noted ip list from apache logs

i found this code
Code: [Select]echo off
if "%1"=="list" (
  netsh advfirewall firewall show rule Blockit | findstr RemoteIP
  exit/b
)

:: Deleting existing block on ips
netsh advfirewall firewall delete rule name="Blockit"

:: Block new ips (while reading them from ip.txt)
for /f %%i in (ip.txt) do (
  netsh advfirewall firewall add rule name="Block_IP" protocol=any dir=in action=block remoteip=%%i
  netsh advfirewall firewall add rule name="Block_IP" protocol=any dir=out action=block remoteip=%%i
)

:: call this batch again with list to show the blocked IPs
call %0 list

this script is creating 1 separate rule for each blocked IP.

but.. i wanna use ONE rule and will add new ip from text file
daily or hourly i will add new ip for block. and will run batch file for block

i dont delete old blocked ip from text file..
when i run batch file will check ip in rule added will pass that ip else will add to rule to end of file

(wanna) last work; will list blocked ip count
smilar msg "Blocked  ###  IP in Windows FireWall"

could you help me ?What documentation are you using?
Have you read this one?
Understanding Windows Firewall settings | Windows 7
Quote

...
A firewall can help prevent hackers or malicious software (such as worms) from gaining access to your computer through a network or the Internet. A firewall can also help stop your computer from SENDING malicious software to other computers.
You can customize four settings for each TYPE of network location in Windows Firewall. To FIND these settings, follow these steps:
    Open Windows Firewall by clicking the Start BUTTON Picture of the Start button, and then clicking Control Panel. In the search box, type firewall, and then click Windows Firewall.
    In the left pane, click Turn Windows Firewall on or off. Administrator permission required If you're prompted for an administrator password or confirmation, type the password or provide confirmation.  ...
hello

thx for doc. sorry dont understand complately

but
if i will block all inbound connection, will lost my remote connection (using vnc with setted port - not default port)

if i can new rule for all inbound connection (exception vnc port) why not

or whats your new idea for security my vds (esxi) ?


Discussion

No Comment Found