Showing posts with label port. Show all posts
Showing posts with label port. Show all posts

Friday, March 30, 2012

How do I Allow SQL DB dump job through a firewall?

We recently moved a SQL box into a DMZ but we still want to allow a Database
dump job to be allowed. What protocol and port needs to be opened for the
following job to run:
BACKUP DATABASE [Database1] TO DISK = N'\\server1\DBBACKUP\Database1' WITH
INIT , NOUNLOAD , NAME = N'Database1', NOSKIP , STATS = 10, NOFORMAT
Network file shares are accessed via the SMB (Server Message Block)
protocol. I have no clue what ports are used.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Paul Cyr" <PaulCyr@.discussions.microsoft.com> wrote in message
news:AEF08916-1733-458F-AE03-C9C6BC771624@.microsoft.com...
> We recently moved a SQL box into a DMZ but we still want to allow a
Database
> dump job to be allowed. What protocol and port needs to be opened for the
> following job to run:
> BACKUP DATABASE [Database1] TO DISK = N'\\server1\DBBACKUP\Database1'
WITH
> INIT , NOUNLOAD , NAME = N'Database1', NOSKIP , STATS = 10, NOFORMAT
|||Hi
I would not let SQL Server "push" though the firewall. Dump the DB locally
to the SQL Server's drive and then have a task from behind the firewall come
and pick the file up.
If you push, and your box gets compromised, the hacker has access through to
your internal network as those ports are open to a supposedly "trusted"
server.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Geoff N. Hiten" <SRDBA@.Careerbuilder.com> wrote in message
news:Odz5U609EHA.2552@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> Network file shares are accessed via the SMB (Server Message Block)
> protocol. I have no clue what ports are used.
> --
> Geoff N. Hiten
> Microsoft SQL Server MVP
> Senior Database Administrator
> Careerbuilder.com
> I support the Professional Association for SQL Server
> www.sqlpass.org
> "Paul Cyr" <PaulCyr@.discussions.microsoft.com> wrote in message
> news:AEF08916-1733-458F-AE03-C9C6BC771624@.microsoft.com...
> Database
the[vbcol=seagreen]
> WITH
NOFORMAT
>
|||That is a great idea. Why didn't I think of that?
I'll try to setup a process that grabs the database on a regular basis after
it has dumped locally but I need to generate e-mail alerts if the dump fails
for any reason so I need to open it up to a certain extent anyway. Actually,
opening to SMTP traffic only seems much better then what I was trying to
accomplish previously.
Thanks again for the suggestion!
"Mike Epprecht (SQL MVP)" wrote:

> Hi
> I would not let SQL Server "push" though the firewall. Dump the DB locally
> to the SQL Server's drive and then have a task from behind the firewall come
> and pick the file up.
> If you push, and your box gets compromised, the hacker has access through to
> your internal network as those ports are open to a supposedly "trusted"
> server.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "Geoff N. Hiten" <SRDBA@.Careerbuilder.com> wrote in message
> news:Odz5U609EHA.2552@.TK2MSFTNGP09.phx.gbl...
> the
> NOFORMAT
>
>

How do I Allow SQL DB dump job through a firewall?

We recently moved a SQL box into a DMZ but we still want to allow a Database
dump job to be allowed. What protocol and port needs to be opened for the
following job to run:
BACKUP DATABASE [Database1] TO DISK = N'\\server1\DBBACKUP\Database1' W
ITH
INIT , NOUNLOAD , NAME = N'Database1', NOSKIP , STATS = 10, NOFORMATNetwork file shares are accessed via the SMB (Server Message Block)
protocol. I have no clue what ports are used.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Paul Cyr" <PaulCyr@.discussions.microsoft.com> wrote in message
news:AEF08916-1733-458F-AE03-C9C6BC771624@.microsoft.com...
> We recently moved a SQL box into a DMZ but we still want to allow a
Database
> dump job to be allowed. What protocol and port needs to be opened for the
> following job to run:
> BACKUP DATABASE [Database1] TO DISK = N'\\server1\DBBACKUP\Database1'
WITH
> INIT , NOUNLOAD , NAME = N'Database1', NOSKIP , STATS = 10, NOFORMAT|||Hi
I would not let SQL Server "push" though the firewall. Dump the DB locally
to the SQL Server's drive and then have a task from behind the firewall come
and pick the file up.
If you push, and your box gets compromised, the hacker has access through to
your internal network as those ports are open to a supposedly "trusted"
server.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Geoff N. Hiten" <SRDBA@.Careerbuilder.com> wrote in message
news:Odz5U609EHA.2552@.TK2MSFTNGP09.phx.gbl...
> Network file shares are accessed via the SMB (Server Message Block)
> protocol. I have no clue what ports are used.
> --
> Geoff N. Hiten
> Microsoft SQL Server MVP
> Senior Database Administrator
> Careerbuilder.com
> I support the Professional Association for SQL Server
> www.sqlpass.org
> "Paul Cyr" <PaulCyr@.discussions.microsoft.com> wrote in message
> news:AEF08916-1733-458F-AE03-C9C6BC771624@.microsoft.com...
> Database
the[vbcol=seagreen]
> WITH
NOFORMAT[vbcol=seagreen]
>|||That is a great idea. Why didn't I think of that?
I'll try to setup a process that grabs the database on a regular basis after
it has dumped locally but I need to generate e-mail alerts if the dump fails
for any reason so I need to open it up to a certain extent anyway. Actually,
opening to SMTP traffic only seems much better then what I was trying to
accomplish previously.
Thanks again for the suggestion!
"Mike Epprecht (SQL MVP)" wrote:

> Hi
> I would not let SQL Server "push" though the firewall. Dump the DB locally
> to the SQL Server's drive and then have a task from behind the firewall co
me
> and pick the file up.
> If you push, and your box gets compromised, the hacker has access through
to
> your internal network as those ports are open to a supposedly "trusted"
> server.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "Geoff N. Hiten" <SRDBA@.Careerbuilder.com> wrote in message
> news:Odz5U609EHA.2552@.TK2MSFTNGP09.phx.gbl...
> the
> NOFORMAT
>
>sql

How do I Allow SQL DB dump job through a firewall?

We recently moved a SQL box into a DMZ but we still want to allow a Database
dump job to be allowed. What protocol and port needs to be opened for the
following job to run:
BACKUP DATABASE [Database1] TO DISK = N'\\server1\DBBACKUP\Database1' WITH
INIT , NOUNLOAD , NAME = N'Database1', NOSKIP , STATS = 10, NOFORMATNetwork file shares are accessed via the SMB (Server Message Block)
protocol. I have no clue what ports are used.
--
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Paul Cyr" <PaulCyr@.discussions.microsoft.com> wrote in message
news:AEF08916-1733-458F-AE03-C9C6BC771624@.microsoft.com...
> We recently moved a SQL box into a DMZ but we still want to allow a
Database
> dump job to be allowed. What protocol and port needs to be opened for the
> following job to run:
> BACKUP DATABASE [Database1] TO DISK = N'\\server1\DBBACKUP\Database1'
WITH
> INIT , NOUNLOAD , NAME = N'Database1', NOSKIP , STATS = 10, NOFORMAT|||Hi
I would not let SQL Server "push" though the firewall. Dump the DB locally
to the SQL Server's drive and then have a task from behind the firewall come
and pick the file up.
If you push, and your box gets compromised, the hacker has access through to
your internal network as those ports are open to a supposedly "trusted"
server.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Geoff N. Hiten" <SRDBA@.Careerbuilder.com> wrote in message
news:Odz5U609EHA.2552@.TK2MSFTNGP09.phx.gbl...
> Network file shares are accessed via the SMB (Server Message Block)
> protocol. I have no clue what ports are used.
> --
> Geoff N. Hiten
> Microsoft SQL Server MVP
> Senior Database Administrator
> Careerbuilder.com
> I support the Professional Association for SQL Server
> www.sqlpass.org
> "Paul Cyr" <PaulCyr@.discussions.microsoft.com> wrote in message
> news:AEF08916-1733-458F-AE03-C9C6BC771624@.microsoft.com...
> > We recently moved a SQL box into a DMZ but we still want to allow a
> Database
> > dump job to be allowed. What protocol and port needs to be opened for
the
> > following job to run:
> > BACKUP DATABASE [Database1] TO DISK = N'\\server1\DBBACKUP\Database1'
> WITH
> > INIT , NOUNLOAD , NAME = N'Database1', NOSKIP , STATS = 10,
NOFORMAT
>|||That is a great idea. Why didn't I think of that?
I'll try to setup a process that grabs the database on a regular basis after
it has dumped locally but I need to generate e-mail alerts if the dump fails
for any reason so I need to open it up to a certain extent anyway. Actually,
opening to SMTP traffic only seems much better then what I was trying to
accomplish previously.
Thanks again for the suggestion!
"Mike Epprecht (SQL MVP)" wrote:
> Hi
> I would not let SQL Server "push" though the firewall. Dump the DB locally
> to the SQL Server's drive and then have a task from behind the firewall come
> and pick the file up.
> If you push, and your box gets compromised, the hacker has access through to
> your internal network as those ports are open to a supposedly "trusted"
> server.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "Geoff N. Hiten" <SRDBA@.Careerbuilder.com> wrote in message
> news:Odz5U609EHA.2552@.TK2MSFTNGP09.phx.gbl...
> > Network file shares are accessed via the SMB (Server Message Block)
> > protocol. I have no clue what ports are used.
> >
> > --
> > Geoff N. Hiten
> > Microsoft SQL Server MVP
> > Senior Database Administrator
> > Careerbuilder.com
> >
> > I support the Professional Association for SQL Server
> > www.sqlpass.org
> >
> > "Paul Cyr" <PaulCyr@.discussions.microsoft.com> wrote in message
> > news:AEF08916-1733-458F-AE03-C9C6BC771624@.microsoft.com...
> > > We recently moved a SQL box into a DMZ but we still want to allow a
> > Database
> > > dump job to be allowed. What protocol and port needs to be opened for
> the
> > > following job to run:
> > > BACKUP DATABASE [Database1] TO DISK = N'\\server1\DBBACKUP\Database1'
> > WITH
> > > INIT , NOUNLOAD , NAME = N'Database1', NOSKIP , STATS = 10,
> NOFORMAT
> >
> >
>
>

Sunday, February 19, 2012

How can I tell whether SQL Server is able to listen to port 1433?

I want to know how to check whether SQL Server 2000 can listen to port 1433 or not. If I run netstat -a, am I suppose to see port 1433 regardless of what service pack I have applied to SQL Server 2000?Things get a bit complicated at this level.

If you run netstat without the -n parameter, you'll probably never see port 1433 because it has a named equivalent.

If you run a named instance of SQL Server, you'll find a redirector listening on port 1434 and SQL Server listening on an arbitrary free port (which the redirector will point incoming connections to when they arrive).

If you run an unnamed instance of SQL Server, you should find it listening on port 1433 as you expected.

-PatP|||Look for this line in SQL Server errorlog:

SQL server listening on <IP_Address>: <Port_Number>.|||Hi Pat,

I believe you mean I should see ms-sql-s but I don't see that one too. I'm running netstat -a on a machine with only the default instance of SQL Server 2000 which I can see port 1433 in the Server Network Utility.

I have a feeling that the issue may be related to XP SP2 RC2. I have tried to add port 1433 and 1434 to the Windows Firewall. I have also tried to add the program sqlservr to the Windows Firewall. I have also turned off Windows Firewall. But when I run netstat -a on all these combinations, I don't see port 1433 or ms-sql-s.|||Do any of the errorlogs (SQL, NT, or other) show anything interesting?

-PatP|||Hi Pat,

The interesting thing that I see is that SQL Server is now only listening to Shared Memory and Named Pipes in SQL Server Logs. But I have checked the SQL Server Logs before XP SP2 RC2 is applied, the SQL Server was listening to TCP, Shared Memory, and Named Pipes. I have checked that the current setting in Server Network Utility and in registry are both showing using TCP and port 1433. There is only the default instance in that machine. Since SQL Server is no longer listening to TCP, this explains why I don't see port 1433. However, the problem is why SQL Server is no longer listening to TCP.|||Try this (http://sqljunkies.com/Newsgroups/microsoft.public.sqlserver.connect/2004/4/27/188677.aspx).

-PatP|||Hi Pat,

I have just tried by switching the port to 0 (stop and start) and then switch back to 1433. (stop and start). The SQL Server is still listening to Shared Memory and Named Pipes.|||Boy, then that beats me. I'll try to bounce this off of some of the guys with real GQ (Geek Quotient) in the morning, but I may not get any response for about 24 hours. You've piqued my curiousity with this one!

-PatP|||If this is a problem of XP SP2 RC2, someone should have spotted this and I cannot imagine MS will release RC2 with this kind of issue. But if it is not, it is a mystery so far.

I'm going to listen to the XP SP2 and SQL Server webcast. May be it will tell me something.|||I believe I found out what happen. After I install XP SP2 RC2 on SQL Server 2000 Personal Edition with SP2, TCP/IP and UDP ports are automatically disabled according to Event Viewer log. I will install SP3a to see whether it will resolve this issue.|||Ahhh! A proactive Slammer-stopper. I hadn't thought of that!

-PatP|||I have applied SP3a and now TCP is open. I believe MS should do a better job in logging this information in Event Viewer. It is logged as INFORMATION entry so it will be easily be ignored.

Thank you for your help.|||Yeah, I'd fire that off to your ADC or TAM, or at the very least send it to mswish. The event message should be more informative.

-PatP|||I just read the FAQ: How Windows XP SP2 Affects SQL Server and MSDE. It has the information about this issue but it says it will create an error entry in the Windows Error log. So, MS just needs to change information to error.