Block some public / external IP addresses to connect to the Internet (from batch file, Windows, firewall).

I'm using Windows 7 Ultimate like Os i. I am looking for a solution for this Os.

I am using a VPN connection. I need to block some public / external IP addresses to access the Internet (I need a ping error), but I can not find a solution.

For public / external IP address, I mean the IP address assigned by my ISP or VPN service, and it will appear on a site like www.mioip.it or whoer.net.

With a bat file, I can have the public / external IP address, but I can not find a solution to make a list of IP addresses that are not accessible on the Internet, and can cause the ping to fail (because this IP Addresses are not allowed to connect to the Internet). ,

I need to block some public / external IP address as my software automatically changes the IP address if the internet connection is not working and the IP address is being tested by a ping site. If ping fails, disconnect my ADSL connection automatically and create a new public / external IP address.

Any suggestion please.