Curl --interface issue - Ask Ubuntu


i try specify wireless interface curl, not working properly.

when lan cable disconnected, works expected. when lan cable plugged in, connection timed out.

see log below, first attempt plugged in lan cable.

user@user-latitude-e6410:~/downloads/ats$ sudo curl http://speedtest4.ziggo.nl/testfile_20g.bin -o /dev/null --retry 0 --limit-rate 500000 --speed-limit 3000 --speed-time 2 --connect-timeout 5 --interface wlp2s0 --verbose      % total    % received % xferd  average speed   time    time     time  current                                    dload  upload   total   spent    left  speed     0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   trying 212.54.52.11...   * local interface wlp2s0 ip 192.168.2.73 using address family 2   * local port: 0   * connected speedtest4.ziggo.nl (212.54.52.11) port 80 (#0)   > /testfile_20g.bin http/1.1   > host: speedtest4.ziggo.nl   > user-agent: curl/7.47.0   > accept: */*   >    < http/1.1 200 ok   < date: thu, 20 oct 2016 20:57:28 gmt   < server: apache   < last-modified: tue, 10 mar 2015 13:29:21 gmt   < etag: "500000000-510ef23751ccf"   < accept-ranges: bytes   < content-length: 21474836480   < content-type: application/octet-stream   <    ^{ [4018 bytes data]     0 20.0g    0 16.1m    0     0   487k      0 11:56:28  0:00:33 11:55:55  488k^c   user@user-latitude-e6410:~/downloads/ats$ sudo curl http://speedtest4.ziggo.nl/testfile_20g.bin -o /dev/null --retry 0 --limit-rate 500000 --speed-limit 3000 --speed-time 2 --connect-timeout 5 --interface wlp2s0 --verbose      % total    % received % xferd  average speed   time    time     time  current                                    dload  upload   total   spent    left  speed     0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   trying 212.54.52.11...   * local interface wlp2s0 ip 192.168.2.73 using address family 2   * local port: 0     0     0    0     0    0     0      0      0 --:--:--  0:00:04 --:--:--     0* connection timed out after 5001 milliseconds     0     0    0     0    0     0      0      0 --:--:--  0:00:05 --:--:--     0   * closing connection 0   curl: (28) connection timed out after 5001 milliseconds   

you might need use --dns-interface.

from man page:

--dns-interface <interface>        tell curl send outgoing dns requests through <interface>. option counterpart --interface (which not affect dns).        supplied string must interface name (not address). 

Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User

sql server - "Configuration file does not exist", Event ID 274 - Super User