Cannot send/receive packets from WiFi to Cellular Modem



  • I am setting up the Omega2S as a hotspot router. A Huawei ME906s modem is connected to the USB. I can ping 8.8.8.8 from the Omega and can connect my mobile phone to the Omega through WiFi, but when I open the browser on my mobile phone, I cannot access internet.

    Running ip addr shows

    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
            link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
            inet 127.0.0.1/8 scope host lo
            valid_lft forever preferred_lft forever
            inet6 ::1/128 scope host 
            valid_lft forever preferred_lft forever
    
    2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel state DOWN qlen 1000
            link/ether 40:a3:6b:c0:3a:01 brd ff:ff:ff:ff:ff:ff
    
    3: ra0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master br-wlan state UNKNOWN qlen 1000
            link/ether 40:a3:6b:c0:39:ff brd ff:ff:ff:ff:ff:ff
            inet6 fe80::42a3:6bff:fec0:39ff/64 scope link 
            valid_lft forever preferred_lft forever
    
    4: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP qlen 1000
            link/ether 02:1e:10:1f:00:00 brd ff:ff:ff:ff:ff:ff
            inet 100.xxx.xx.x/29 brd 100.xxx.xx.x scope global usb0
            valid_lft forever preferred_lft forever
            inet6 fe80::1e:10ff:fe1f:0/64 scope link 
            valid_lft forever preferred_lft forever
    
    5: br-wlan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
            link/ether 40:a3:6b:c0:39:ff brd ff:ff:ff:ff:ff:ff
            inet 192.168.3.1/24 brd 192.168.3.255 scope global br-wlan
            valid_lft forever preferred_lft forever
            inet6 fd1d:48c4:7633::1/60 scope global 
            valid_lft forever preferred_lft forever
            inet6 fe80::42a3:6bff:fec0:39ff/64 scope link 
            valid_lft forever preferred_lft forever
    
    6: apcli0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN qlen 1000
            link/ether 40:a3:6b:c0:39:00 brd ff:ff:ff:ff:ff:ff
            inet6 fe80::42a3:6bff:fec0:3900/64 scope link 
            valid_lft forever preferred_lft forever
    

    The following is my configuration:

    /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 'fd1d:48c4:7633::/48'
    
    config interface 'wlan'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.3.1'
        option netmask '255.255.255.0'
        option ip6assign '60'
    
    config interface 'usb'
        option ifname 'usb0'
        option proto 'dhcp'
    
    config interface 'wwan'
       option ifname 'apcli0'
       option proto 'dhcp'
       option hostname 'Omega-39FF'
    
    config interface 'usb'
       option ifname 'wwan0'
       option proto 'dhcp'
    

    /etc/config/firewall

    config defaults
        option syn_flood '1'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option disable_ipv6 '1'
    
    config zone
        option name 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        list network 'wlan'
    
    config zone
        option name 'wan'
        option output 'ACCEPT'
        option forward 'REJECT'
        option masq '1'
        option mtu_fix '1'
        option network 'wwan'
        option input 'ACCEPT'
    
    config zone
        option name 'usb'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        option masq '1'
        option mtu_fix '1'
        list network 'wwan'
        list network 'usb'
        option input 'ACCEPT'
    
    config forwarding
        option src 'lan'
        option dest 'usb'
    
    config rule
        .....
    

    I restarted the network after setting up the above configuration, but I still cannot access internet from my mobile phone's browser.

    I also tried adding the following to the file /etc/firewall.user, but still it does not work.

    iptables -t nat -A POSTROUTING -o usb0 -j MASQUERADE
    iptables -A FORWARD -i wlan -o usb0 -j ACCEPT
    

    Any help is appreciated. Thanks in advance.



  • @aobs At a glance, this is what I notice. Interface br-wlan is set to be the access point (AP) at IP=192.168.3.1. Internet access would be accommodated on the apcli0 interface which is only set up for an IPv6 local link address. As such there is no Internet access.

    Follow the reasonably well documented procedure(s) for connecting the O2 to a WiFi SSID that can route to the Internet.

    More detail will follow if you desire.

    take care!!
    Bill





  • @William-Scott Thanks for the help. The Omega is set up as an access point and not a station. The system will access the internet through the modem's gateway. The cellular modem is connected to the Omega's USB. The apcli0 interface is actually unused.

    The Omega acts as an hotspot router. Mobile devices will connect to the Omega's SSID and access internet through the cellular modem.

    File /etc/config/wireless

    config wifi-device 'radio0'
      option type 'ralink'
      option variant 'mt7628'
      option country 'US'
      option hwmode '11g'
      option htmode 'HT40'
      option channel 'auto'
      option disabled '0'
      option device_mode 'apsta'
      option op_mode 'preference'
    
    config wifi-iface 'ap'
      option device 'radio0'
      option mode 'ap'
      option maxassoc '5'
      option network 'wlan'
      option ifname 'ra0'
      option encryption 'psk2'
      option key 'MyKey'
      option disabled '0'
      option ssid 'Omega-39FF'
    
    config wifi-iface 'sta'
      option device 'radio0'
      option mode 'sta'
      option ifname 'apcli0'
      option encryption 'psk2'
      option ssid 'YourSsidHere'
      option key 'YourPasswordHere'
      option network 'wwan'
      option disabled '1'
    

    I have modified the following zone in /etc/config/firewall - change list network 'wwan' to list network 'wlan':

    config zone
      option name 'usb'
      option output 'ACCEPT'
      option forward 'ACCEPT'
      option masq '1'
      option mtu_fix '1'
      list network 'wlan'
      list network 'usb'
      option input 'ACCEPT'
    

    Still cannot access internet from my mobile device after connecting to the Omega.



  • @aobs Daoh! I missed what is now an obvious point.

    Best wishes!
    Bill



  • @Douglas-Kryder Thanks. Actually, I have already gone through those pages.



  • The original firewall configuration is correct. The problem is the

    config interface 'usb'
        option ifname 'wwan0'
        option proto 'dhcp'
    

    After removing this from /etc/config/network, I can get internet on the mobile device after connecting to the Omega.



Looks like your connection to Community was lost, please wait while we try to reconnect.