Wget to ignore an IP address

Hello Unix Geeks,

I am in a situation to use wget for crawling a site where the site contains 5 IP addresses. Out of 5, 4 are accessible and 1[say it as X.X.X.X] is having a problem due to firewall problems.

In this case, my wget is getting stuck with that X.X.X.X and giving up. How can I ignore this IP and redirect my wget to use the other IP out of 4.

Kindly help me on this...

You can try using one of the wget "timeout" options.

timeout can help you to come out of it when the time breaches, isn't it ? My case is to try the other IP address and not the X.X.X.X

There are possibly other options, such as changing your hosts file or using iptables, etc, but I don't want to make any assumptions about how you are doing what you're doing. Can you explain in more detail the steps you are taking and what the goal is?

Also, please say which operating system (incl. version) and what shell you are using.

 $ wget --version
GNU Wget 1.11.4 Red Hat modified
uname -a
Linux 2.6.18-308.11.1.el5 #1 SMP Fri Jun 15 15:41:53 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
$ echo $0
ksh