Any help with opkg update (Failed to establish connection)

hi there i want to use wpa2 enterprise for my ap with lede but i have some problem when i use opkg update i get download faild with this message
(establish connection) my ap is connected to internet and i get same problem with ssh and luci any suggestion ?

...you provided no message.

Depending on your configuration, you have to make sure the correct interface has:

  • IP
  • DNS
  • Gateway

Hope this helps.

1 Like

thank you , i see it and its same

( Downloading http://downloads.lede-project.org/releases/17.01.4/packages/mips_24kc/base/Packages.gz
Failed to establish connection
*** Failed to download the package list from http://downloads.lede-project.org/releases/17.01.4/packages/mips_24kc/base/Packages.gz)

You need to make sure set gateway & dns for your AP.

There is something wrong with your network settings or connectivity. You may e.g. have invalid DNS settings (like already said twice), or maybe your ISP has blocked traffic from http://downloads.lede-project.org/

Make sure that downloading stuff with normal wget works. The same list can be downloaded with the command
wget http://downloads.lede-project.org/releases/17.01.4/packages/mips_24kc/base/Packages.gz

Can you ping 8.8.8.8, either via console or via GUI (Network -> Diagnostics -> Enter 8.8.8.8 at the ping field and click "Ping")?

Oh thank you very much I think thers some things block , but when I copy the download link and open it in my web browser I get it and I can download , but I think the block with ssh port ! Do you have any idea in this case if my isp block ssh port can I do it manually ?! Thx for your time

You need to shows us you network and dhcp config, meaning /etc/config/network and /etc/config/dhcp files. Also the firewall config might be needed. If you can download it from your browser, then it is not about an external block, but there is just something wrong in the router's config.

But nobody can help you unless you provide exact info about your config.

1 Like

thank you very much i show you my network and dhcp config as below

this is my network config

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'
config globals 'globals'
        option ula_prefix 'fd58:6df8:92ed::/48'
config interface 'lan'
        option type 'bridge'
        option ifname 'eth0'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option gateway '10.0.0.1'
        option dns '8.8.8.8'
       option ipaddr '10.0.132.100'

and this dhcp config

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.auto'
        option localservice '1'
config dhcp 'lan'
        option interface 'lan'
        option dhcpv6 'server'
        option ra 'server'
        option ignore '1'
        option ra_management '1'
config dhcp 'wan'
        option interface 'wan'
        option ignore '1'
config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'

and this is firewall

config defaults
        option syn_flood        1
        option input            ACCEPT
        option output           ACCEPT
        option forward          REJECT
Uncomment this line to disable ipv6 rules
       option disable_ipv6     1
config zone
        option name             lan
        list   network          'lan'
        option input            ACCEPT
        option output           ACCEPT
        option forward          ACCEPT
config zone
        option name             wan
        list   network          'wan'
        list   network          'wan6'
        option input            REJECT
        option output           ACCEPT
        option forward          REJECT
        option masq             1
        option mtu_fix          1
config forwarding
        option src              lan
        option dest             wan
 We need to accept udp packets on port 68,
 see https://dev.openwrt.org/ticket/4108
config rule
        option name             Allow-DHCP-Renew
        option src              wan
        option proto            udp
        option dest_port        68
        option target           ACCEPT
        option family           ipv4
Allow IPv4 ping
config rule
        option name             Allow-Ping
        option src              wan
        option proto            icmp
        option icmp_type        echo-request
        option family           ipv4
        option target           ACCEPT
config rule
        option name             Allow-IGMP
        option src              wan

thx for your time

i test it thers no ping on google dns 8.8.8.8 or 8.8.4.4

First error is right here:

You have defined the subnet (netmask) so that router's own IP address and the gateway address are not in the same subnet. This breaks routing.

Your netmask 255.255.255.0 defines that only the last number of the IP address varies inside the subnet. So, the router 10.0.132.100 thinks that only 10.0.132.(0-254) are in the same net. It has no idea how to reach 10.0.0.1 that you have defines as gateway.

Either

  • change the subnet netmask to 255.255.0.0 or
  • adjust the router's IP address to be inside the same subnet as the gateway. If gateway is 10.0.0.1 and netmask is 255.255.255.0, the router's IP address can be 10.0.0.(1-254, well not actually 1 as gateway has that, so 2-254)

EDIT:
based on that gateway 10.0.0.1 gateway address, I suspect that you have more complex net environment than just a LEDE router. An additional router? A smart modem? It could well be that you need a bit more complex config, if you need to avoid double NAT or double DHCP etc.

So, what are you actually trying to accomplish? Add a LEDE router to an existing net?

1 Like

Thank you for your time I work with lede for my puplic wifi network I have with my network 130 ap active in puplic zone , I work with unifi ac mesh but I have mire problem like coverage speed ... etc , so I test lede and thers big difference from my unifi so I want to upgrade all my unifi to lede and work with wpa2 enterprise I install radius in google cloud and its work but I cant install wpad for my ap , can you help me with best config for lede ap , my main router get 10.0.0.1/16 ip thx

In a /16 network, the netmask is 255.255.0.0 as already mentioned.

I have the same issue with opkg update after I configured openvpn. Any help is appreciated.

Collected errors:
 * opkg_download: Failed to download http://downloads.lede-project.org/releases/17.01.4/targets/mvebu/generic/packages/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

network config

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd77:1b85:17f0::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option ifname 'eth1'
        option proto 'dhcp'

config interface 'wan6'
        option ifname 'eth1'
        option proto 'dhcpv6'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0 1 2 3 5'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '4 6'

config interface 'PIA_VPN'
        option proto 'none'
        option ifname 'tun0'

dhcp config

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.auto'
        option localservice '1'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv6 'server'
        option ra 'server'
        list dhcp_option '6,209.222.18.222,209.222.18.218'
        option ra_management '1'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'

See this LEDE thread...

jwoods thanks for that....i tried adding below to no avail. i am going to change dns servers to see if that works

config interface wan
    option ipv6 0

nothing works that I tried...i still cannot get opkg update to work

worked fine until i upgraded to 17.01.4

Of course it's still not working... You still haven't configured a Gateway.

Maybe I missed this...but did you confirm your Internet was on LAN or WAN?

I have the same problem;

when I try to download updates in Luci interface there is a warning that:

The opkg install command failed with code 255 .

how can I sure the correct interface

  • IP
  • DNS
  • Gateway
    ?
root@OpenWrt:~# cat /etc/config/network

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fdc4:264d:2461::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'static'
        option ip6assign '60'
        option ipaddr '192.168.0.111'
        option netmask '255.255.255.0'

config interface 'wan'
        option ifname 'eth0.2'
        option proto 'dhcp'

config interface 'wan6'
        option ifname 'eth0.2'
        option proto 'dhcpv6'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '1 2 3 4 5t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '0 5t'