Is there any WIN32 API's to block IP address/s without using any firewall?
- posted
18 years ago
Is there any WIN32 API's to block IP address/s without using any firewall?
You can use the Hosts file to block IP addresses.
No, you can't. The HOSTS file ONLY translates EXACT matches of host/domain names to IP addresses of your choice. You can't enter an IP address and translate, or redirect, it to another IP address. You can block host/domain names by redirecting them to the localhost IP address of 127.0.0.1.
snipped-for-privacy@gmail.com wrote in news:1116509960.605904.286700 @z14g2000cwz.googlegroups.com:
I really don't know what you're after as far as some Win32 API that can be used to block IP(s). There is a packet filtering solution on the Win 2k O/S and up.
Viking proxy server may be of use.
it's a simple text file called hosts (no extension). Configuration looks like this
You need 3rd party software to do such things. Such as software (or hardware) firewalls.
Again, the HOSTS file does *NOT* block IP addresses, it (re)directs domain/host names to IP addresses that you have entered, which can be used for blocking. You can *NOT* redirect one IP address to another.
Wrong. That's backwards. The proper configuration is one entry per line with the IP address first followed by at least one blank space and then the domain/host name you want to be redirected. Like this:
127.0.0.1
Please note that I was only straightening out incorrect information about the HOSTS file. :o)
When I don't want to connect with something I either drop the domain name or host name in DNSKong's named.txt file, or the IP address or address range in eDexter's PAC file. I don't use the HOSTS file for blocking, too much effort compared to DNSKong & eDexter.
Noted. And if the person does not have a router?
if you want to stop your windows having an IP 'conversation' with another node then you could set up 'route' so the replies get lost
eg, if your windows is on 192.168.1.5 with a mask of 255.255.255.0 and your router is in 192.168.1.1 and you want to not talk to
216.73.92.112do route add 216.73.92.112 mask 255.255.255.255 192.168.1.2 /p
Note. there is no router (or anything) 192.168.1.2.
Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.