Hi,
How can i block IP address and port with VB(Powerfull)?
Very thanks.
Printable View
Hi,
How can i block IP address and port with VB(Powerfull)?
Very thanks.
Get a firewall.
And what is VB Powerful? :confused:
But yea, a firewall will be your easiest bet. As to how to make a (good) firewall in VB I'm not sure. But there are a lot of them that have been made that you can look at:
http://www.pscode.com/vb/scripts/Bro...1=Quick+Search
Tnx, but i dont need firewall! i need just code for block IP & port! ;)
IP and port from what? Incoming connections? Outgoing connections? Try being more specific.
Both :D
That's called a firewall.
There is apparently some good code for how to do this in the link I posted.
I don't think there is a real way of blocking IP's with VB. All the code on pscode.com is based on continuously checking established TCP connections and disconnecting them.
If disconnecting is good enough, then look at the GetTcpTable function.
So, we cant block IP address or port with VB?
For the whole computer, or for the VB application you're writing? For the whole computer, no.
I need code for VB application writing!
What are you using? A Winsock control? If so, just check the address and/or port before navigating to it and, if it's on your list of not-allowed ones, pop up a message box and don't navigate to it.