OpenWrt Forum Archive

Topic: wget not working (and hence opkg not working also)

The content of this topic has been archived on 30 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I installed kamikaze 8.09 + x-wrt for atheros from x-wrt.org.

I want to add packages (specifically, bandwidthd).

Problem: opkg times out on connecting.
I can ping downloads.openwrt.org from the router; I can access downloads.openwrt.org from
a web browser connected to the router - but the router is acting as a switch (it's a DIR-300) so that does not tell me a whole lot.
Could it be firewall?  Not sure what to look at next...

Here is ping and wget output from ssh on the router.
------------------------------------------------------------------------------------
root@OpenWrt:~# ping downloads.openwrt.org
PING downloads.openwrt.org (195.56.146.238): 56 data bytes
64 bytes from 195.56.146.238: seq=0 ttl=53 time=341.412 ms
64 bytes from 195.56.146.238: seq=1 ttl=53 time=339.293 ms
^C
--- downloads.openwrt.org ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 339.293/340.352/341.412 ms
root@OpenWrt:~# wget -O myfile -Y off http://downloads.openwrt.org/kamikaze/8.09
/atheros/packages/Packages.gz
Connecting to downloads.openwrt.org (195.56.146.238:80)
wget: cannot connect to remote host (195.56.146.238): Connection timed out
root@OpenWrt:~#

Further to the above:

I am currently using the router inside a private network.  The main router logs all traffic; it logs DNS lookup caused by wget but does not log an outgoing port 80 connection, which is further evidence that the connection to port 80 being established by wget is being blocked before it leaves the router.

Since this is a DIR-300, it only has one interface eth0 and all external ports appear to be a switch together.

I hope to install bandwidthd and be able to use the router to obtain graphs of bandwidth usage by placing the router as a switch in my network.

The link above solved the problem:

If you want to use opkg on a router that is behind another NAT router, use the command

sysctl -w net.ipv4.tcp_ecn=0

and opkg will work.

The discussion might have continued from here.