Close UDP Ports (connections)...

Hi !

I can close TCP connections with:
MIB_TCP_STATE_DELETE_TCB and SetTcpEntry(…);

But… How can I close UDP connections ?

Thank you

The phrase “UDP connections” isn’t all that well defined, because it’s
not really a “connection”-based protocol. What are you trying to
accomplish by doing this?

Marcos Velasco wrote:

Hi !

I can close TCP connections with:
MIB_TCP_STATE_DELETE_TCB and SetTcpEntry(…);

But… How can I close UDP connections ?

Thank you


…/ray..

Hi !
I need make a program for close UDP ports…

----- Original Message -----
From: “Ray Trent”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Wednesday, December 24, 2003 1:58 PM
Subject: [ntdev] Re: Close UDP Ports (connections)…

> The phrase “UDP connections” isn’t all that well defined, because it’s
> not really a “connection”-based protocol. What are you trying to
> accomplish by doing this?
>
> Marcos Velasco wrote:
>
> > Hi !
> >
> > I can close TCP connections with:
> > MIB_TCP_STATE_DELETE_TCB and SetTcpEntry(…);
> >
> > But… How can I close UDP connections ?
> >
> > Thank you
> >
> >
> >
> >
>
> –
> …/ray..
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@uol.com.br
> To unsubscribe send a blank email to xxxxx@lists.osr.com

UDP is connection-less protocol, no connections for UDP :slight_smile:

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Marcos Velasco”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, December 24, 2003 2:28 PM
Subject: [ntdev] Close UDP Ports (connections)…

> Hi !
>
> I can close TCP connections with:
> MIB_TCP_STATE_DELETE_TCB and SetTcpEntry(…);
>
> But… How can I close UDP connections ?
>
> Thank you
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

Hi … ok…

But dont have a way to close the UDP ports ?

----- Original Message -----
From: “Maxim S. Shatskih”
To: “Windows System Software Devs Interest List”
Sent: Friday, December 26, 2003 6:38 PM
Subject: [ntdev] Re: Close UDP Ports (connections)…

> UDP is connection-less protocol, no connections for UDP :slight_smile:
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> ----- Original Message -----
> From: “Marcos Velasco”
> To: “Windows System Software Devs Interest List”
> Sent: Wednesday, December 24, 2003 2:28 PM
> Subject: [ntdev] Close UDP Ports (connections)…
>
>
> > Hi !
> >
> > I can close TCP connections with:
> > MIB_TCP_STATE_DELETE_TCB and SetTcpEntry(…);
> >
> > But… How can I close UDP connections ?
> >
> > Thank you
> >
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@uol.com.br
> To unsubscribe send a blank email to xxxxx@lists.osr.com

  1. find and terminate the application listening on that port !
  2. Install a firewall

-Farooque Khan
http://farooque.150m.com

“Marcos Velasco” wrote in message
news:xxxxx@ntdev…
>
> Hi … ok…
>
> But dont have a way to close the UDP ports ?
>
>
>
> ----- Original Message -----
> From: “Maxim S. Shatskih”
> To: “Windows System Software Devs Interest List”
> Sent: Friday, December 26, 2003 6:38 PM
> Subject: [ntdev] Re: Close UDP Ports (connections)…
>
>
> > UDP is connection-less protocol, no connections for UDP :slight_smile:
> >
> > Maxim Shatskih, Windows DDK MVP
> > StorageCraft Corporation
> > xxxxx@storagecraft.com
> > http://www.storagecraft.com
> >
> >
> > ----- Original Message -----
> > From: “Marcos Velasco”
> > To: “Windows System Software Devs Interest List”
> > Sent: Wednesday, December 24, 2003 2:28 PM
> > Subject: [ntdev] Close UDP Ports (connections)…
> >
> >
> > > Hi !
> > >
> > > I can close TCP connections with:
> > > MIB_TCP_STATE_DELETE_TCB and SetTcpEntry(…);
> > >
> > > But… How can I close UDP connections ?
> > >
> > > Thank you
> > >
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> > > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@uol.com.br
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>

Hi !

I need close the ports without terminate application…
And I need make this programaticly… in others words… without use a
firewall…
My program need close the ports…

Regards

----- Original Message -----
From: “Farooque Khan”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Saturday, December 27, 2003 9:52 AM
Subject: [ntdev] Re: Close UDP Ports (connections)…

> 1. find and terminate the application listening on that port !
> 2. Install a firewall
> 3. …
>
> –
>
> -Farooque Khan
> http://farooque.150m.com
>
>
>
>
> “Marcos Velasco” wrote in message
> news:xxxxx@ntdev…
> >
> > Hi … ok…
> >
> > But dont have a way to close the UDP ports ?
> >
> >
> >
> > ----- Original Message -----
> > From: “Maxim S. Shatskih”
> > To: “Windows System Software Devs Interest List”
> > Sent: Friday, December 26, 2003 6:38 PM
> > Subject: [ntdev] Re: Close UDP Ports (connections)…
> >
> >
> > > UDP is connection-less protocol, no connections for UDP :slight_smile:
> > >
> > > Maxim Shatskih, Windows DDK MVP
> > > StorageCraft Corporation
> > > xxxxx@storagecraft.com
> > > http://www.storagecraft.com
> > >
> > >
> > > ----- Original Message -----
> > > From: “Marcos Velasco”
> > > To: “Windows System Software Devs Interest List”
> > > Sent: Wednesday, December 24, 2003 2:28 PM
> > > Subject: [ntdev] Close UDP Ports (connections)…
> > >
> > >
> > > > Hi !
> > > >
> > > > I can close TCP connections with:
> > > > MIB_TCP_STATE_DELETE_TCB and SetTcpEntry(…);
> > > >
> > > > But… How can I close UDP connections ?
> > > >
> > > > Thank you
> > > >
> > > >
> > > >
> > > > —
> > > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > > >
> > > > You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> > > > To unsubscribe send a blank email to
xxxxx@lists.osr.com
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: xxxxx@uol.com.br
> > > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >
> >
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@uol.com.br
> To unsubscribe send a blank email to xxxxx@lists.osr.com

And do you also need a fence that is impassable to pink elephants?

UDP is connectionless. Nothing gets ‘opened’, except a handle that
allows the application to shoot off packets – each packet to a
different address.

For that matter, applications can open a raw IP socket and engage in TCP
on their own, too.

Why don’t you explain what you think it would accomplish to ‘close UDP
ports’. Possibilities:

  1. Prevent sending future packets to certain IP/port combinations.
  2. Prevent receiving future packets to certain IP/port combinations.
  3. Application errors when sending any UDP packets.

Discover the handle that the process is using, create a remote thread in
the process, call NtClose.

– arlie

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Marcos Velasco
Sent: Saturday, December 27, 2003 7:17 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: Close UDP Ports (connections)…

Hi !

I need close the ports without terminate application…
And I need make this programaticly… in others words… without use a
firewall… My program need close the ports…

Regards

----- Original Message -----
From: “Farooque Khan”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Saturday, December 27, 2003 9:52 AM
Subject: [ntdev] Re: Close UDP Ports (connections)…

> 1. find and terminate the application listening on that port ! 2.
> Install a firewall 3. …
>
> –
>
> -Farooque Khan
> http://farooque.150m.com
>
>
>
>
> “Marcos Velasco” wrote in message
> news:xxxxx@ntdev…
> >
> > Hi … ok…
> >
> > But dont have a way to close the UDP ports ?
> >
> >
> >
> > ----- Original Message -----
> > From: “Maxim S. Shatskih”
> > To: “Windows System Software Devs Interest List”

> > Sent: Friday, December 26, 2003 6:38 PM
> > Subject: [ntdev] Re: Close UDP Ports (connections)…
> >
> >
> > > UDP is connection-less protocol, no connections for UDP :slight_smile:
> > >
> > > Maxim Shatskih, Windows DDK MVP
> > > StorageCraft Corporation
> > > xxxxx@storagecraft.com
> > > http://www.storagecraft.com
> > >
> > >
> > > ----- Original Message -----
> > > From: “Marcos Velasco”
> > > To: “Windows System Software Devs Interest List”

> > > Sent: Wednesday, December 24, 2003 2:28 PM
> > > Subject: [ntdev] Close UDP Ports (connections)…
> > >
> > >
> > > > Hi !
> > > >
> > > > I can close TCP connections with: MIB_TCP_STATE_DELETE_TCB and
> > > > SetTcpEntry(…);
> > > >
> > > > But… How can I close UDP connections ?
> > > >
> > > > Thank you
> > > >
> > > >
> > > >
> > > > —
> > > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > > >
> > > > You are currently subscribed to ntdev as: xxxxx@storagecraft.com

> > > > To unsubscribe send a blank email to
xxxxx@lists.osr.com
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: xxxxx@uol.com.br

> > > To unsubscribe send a blank email to
> > > xxxxx@lists.osr.com
> >
> >
> >
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@uol.com.br To
> unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@sublinear.org To
unsubscribe send a blank email to xxxxx@lists.osr.com

Hi !
Sorry for my bad english…

I need close the connection for this situation:

  1. Prevent sending future packets to certain IP/port combinations.

Regards

----- Original Message -----
From: “benson margulies”
To: “Windows System Software Devs Interest List”
Sent: Saturday, December 27, 2003 11:31 AM
Subject: [ntdev] Re: Close UDP Ports (connections)…

> And do you also need a fence that is impassable to pink elephants?
>
> UDP is connectionless. Nothing gets ‘opened’, except a handle that
> allows the application to shoot off packets – each packet to a
> different address.
>
> For that matter, applications can open a raw IP socket and engage in TCP
> on their own, too.
>
> Why don’t you explain what you think it would accomplish to ‘close UDP
> ports’. Possibilities:
>
> 1) Prevent sending future packets to certain IP/port combinations.
> 2) Prevent receiving future packets to certain IP/port combinations.
> 3) Application errors when sending any UDP packets.
>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@uol.com.br
> To unsubscribe send a blank email to xxxxx@lists.osr.com

‘Closing the connection’ won’t do that. For UDP, there is no necessary
relationship between handle and IP address/port. A winsock handle can be
used to shoot a UDP packet anywhere. If you randomly close handles
opened for UDP, you are going to break other, legitimate, activities.

You need some sort of network filter in the kernel if you want to
control UDP traffic.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Marcos Velasco
Sent: Saturday, December 27, 2003 2:15 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: Close UDP Ports (connections)…

Hi !
Sorry for my bad english…

I need close the connection for this situation:

  1. Prevent sending future packets to certain IP/port combinations.

Regards

----- Original Message -----
From: “benson margulies”
To: “Windows System Software Devs Interest List”
Sent: Saturday, December 27, 2003 11:31 AM
Subject: [ntdev] Re: Close UDP Ports (connections)…

> And do you also need a fence that is impassable to pink elephants?
>
> UDP is connectionless. Nothing gets ‘opened’, except a handle that
> allows the application to shoot off packets – each packet to a
> different address.
>
> For that matter, applications can open a raw IP socket and engage in
> TCP on their own, too.
>
> Why don’t you explain what you think it would accomplish to ‘close UDP

> ports’. Possibilities:
>
> 1) Prevent sending future packets to certain IP/port combinations.
> 2) Prevent receiving future packets to certain IP/port combinations.
> 3) Application errors when sending any UDP packets.
>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@uol.com.br To
> unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@dchbk.us
To unsubscribe send a blank email to xxxxx@lists.osr.com

> I need close the ports without terminate application…

It will crash anyway after such a thing :slight_smile:

My program need close the ports…

Impossible. Use the firewall.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com