Skip to content

Instantly share code, notes, and snippets.

@petevb
Last active July 19, 2019 13:59
Show Gist options
  • Save petevb/847d31428f886ae289c2133c02e2d5e9 to your computer and use it in GitHub Desktop.
Save petevb/847d31428f886ae289c2133c02e2d5e9 to your computer and use it in GitHub Desktop.
Connect to SQL Server through Windows firewall

try this

netsh advfirewall firewall add rule name = SQLPort dir = in protocol = tcp action = allow localport = 1433 remoteip = localsubnet profile = DOMAIN

NB I tried this first

netsh firewall set portopening protocol = TCP port = 1433 name = SQLPort mode = ENABLE scope = SUBNET profile = CURRENT

but got:

image

See https://go.microsoft.com/fwlink/?linkid=121488 for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment