Downloading a file with wget through a specific interface

Sometimes I need to download a file from a computer with multiple net interfaces, but only one is connected to the Internet. In these cases I use the bind-address option of the wget command, which binds the connection to the address specified in the local machine.

$ wget --bind-address= \
--2010-03-27 12:25:56--
           => `ppp-2.4.4-11.fc11.src.rpm.1'
Connecting to||:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD /vol/rzm1/linux-fedora-secondary/development/source/SRPMS ... done.
==> SIZE ppp-2.4.4-11.fc11.src.rpm ... 724348
==> PASV ... done.    ==> RETR ppp-2.4.4-11.fc11.src.rpm ... done.
Length: 724348 (707K)

100%[========================================>] 724,348      173K/s   in 4.1s    

2010-03-27 12:26:03 (173 KB/s) - `ppp-2.4.4-11.fc11.src.rpm.1' saved [724348]

speak up

Add your comment below, or trackback from your own site.

Subscribe to these comments.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*Required Fields