• Welcome to SQLitening Support Forum.
 

Automatically add SQLitening or port to Windows 7 firewall

Started by cj, September 17, 2011, 05:35:52 AM

Previous topic - Next topic

cj

I have seen where the windows firewall doesn't ask to add SQLiteningServer.exe and
the server will work for awhile and then be blocked.

Here are useful commands that could be shelled to from your program or typed at a command prompt. 
I created a batch file named firewall.bat below to test them.

This is a lot easier than having users do this:
Click start, control panel, Windows firewall, Allow a program or feature through Windows Firewall, Allow another program, Browse, Find and click on SqliteningServer.exe,, click add, click ok.


@cls
rem Allow a program or feature through Windows Firewall http://support.microsoft.com/kb/947709

netsh advfirewall set currentprofile state off
netsh advfirewall set currentprofile state on
netsh advfirewall firewall delete rule name="SQLiteningServer.Exe"
netsh advfirewall firewall delete rule name="Open Port 51234" protocol=TCP localport=51234
netsh advfirewall firewall add rule name=   "SQLiteningServer.Exe" dir=in action=allow program="SQLiteningServer.exe" enable=yes
netsh advfirewall firewall add rule name=   "Open Port 51234" dir=in action=allow protocol=TCP localport=51234








cj

#1
These might be better (for now) if using older operating systems.
It works with Windows 7.  Not tested with earlier operating systems.


@REM Syntax: PortOn.bat 51234
netsh firewall add portopening protocol=TCP port=%1 "%1 SQLitening"



@REM Syntax:  PortOff.bat 51234
netsh firewall delete portopening protocol=TCP port=%1