SQL server only visible when firewall rule set to public

Need help configuring your VPN? Just post here and you'll get that help.
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
maxmumford
OpenVPN User
Posts: 25
Joined: Tue Apr 05, 2011 3:18 pm

SQL server only visible when firewall rule set to public

Post by maxmumford » Wed Apr 06, 2011 12:05 pm

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.

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

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

Post by janjust » Wed Apr 06, 2011 12:07 pm

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.

maxmumford
OpenVPN User
Posts: 25
Joined: Tue Apr 05, 2011 3:18 pm

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

Post by maxmumford » Wed Apr 06, 2011 12:53 pm

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.

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

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

Post by janjust » Wed Apr 06, 2011 2:18 pm

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.

maxmumford
OpenVPN User
Posts: 25
Joined: Tue Apr 05, 2011 3:18 pm

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

Post by maxmumford » Wed Apr 06, 2011 4:05 pm

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.

maxmumford
OpenVPN User
Posts: 25
Joined: Tue Apr 05, 2011 3:18 pm

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

Post by maxmumford » Fri Apr 08, 2011 9:29 am

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.

maxmumford
OpenVPN User
Posts: 25
Joined: Tue Apr 05, 2011 3:18 pm

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

Post by maxmumford » Fri Apr 22, 2011 1:59 pm

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

Post Reply