Page 1 of 1

SQL server only visible when firewall rule set to public

Posted: Wed Apr 06, 2011 12:05 pm
by maxmumford
Hi all,

I have connected my server and computer via an OpenVPN. I have installed SQL server 2008 R2 express on the server and disabled the firewall. From the client, I can use a .udl file to connect to the server successfully.

I have enabled the firewall. I have set up two firewall rules allowing all connections coming from and going to the SQL Server service and the SQL Browser service. When Both the rules' profiles are set to "Public" (i.e. public network connections are allowed), the connection works between the client and the server, using connection string "10.8.0.1\SQL2008R2", however when the rules are set to "Private" (i.e. private network and vpn connections are allowed), the connection fails.

Can anybody shed any light on this problem?

Thanks,
Max.

Re: SQL server only visible when firewall rule set to public

Posted: Wed Apr 06, 2011 12:07 pm
by janjust
I presume Win2008 has the same firewalling concept that Vista/7 have; by default the tap-win32 adapter is a "public" adapter and hence falls under the public firewalling rules. On Vista&7 you can change the tap-win32 adapter to a 'private' adapter - I hope you can do the same on Win2008.

Re: SQL server only visible when firewall rule set to public

Posted: Wed Apr 06, 2011 12:53 pm
by maxmumford
Wow that would have taken me for ever (if ever) to find, thanks for your help. to set it to private I went into

network & sharing centre -> customize adapter (lan 2) -> private

And everything seems to work. Only problem is, when I restart the machine the adapter goes back to public mode. Is there a way to keep it in private mode? Or a command line script we can run every time the computer starts up?

Thanks,
Max.

Re: SQL server only visible when firewall rule set to public

Posted: Wed Apr 06, 2011 2:18 pm
by janjust
this is windows vista/7 specific, but if I understand it correctly then you need to change your adapter to private as administrator with elevated privileges - in that case it should survive a reboot.

Re: SQL server only visible when firewall rule set to public

Posted: Wed Apr 06, 2011 4:05 pm
by maxmumford
Thanks, I can't test it now as I am FTP'ing a large file up to the server so I'll test it Friday and let you know.

Re: SQL server only visible when firewall rule set to public

Posted: Fri Apr 08, 2011 9:29 am
by maxmumford
Hi,

How exactly do I achieve it with admin privilages? I'm logged into an admin account and there is the admin shield icon next to the private mode checkbox indicating that it requires admin privilages to be changed, however when I click it I don't get the UAC popup.

I also cannot right click the network and sharing centre entry in the start menu and click run as admin...

Any suggestions?

Thanks,
Max.

Re: SQL server only visible when firewall rule set to public

Posted: Fri Apr 22, 2011 1:59 pm
by maxmumford
Ok figured that part out. I then looked into automatically scripting this, as we dont want our users to not be able to login due to somebody forgetting to set the adapter to private.

Checkout this thread for answers if anybody is interested:

http://social.technet.microsoft.com/For ... 5aca88dafd