wifi hotspot no route to Internet
#1
Hi
I am installed arch/phosh yesterday
I got wifi hotspot working, and from my laptop I can ping the phone, but I can't get to the Internet.
I checked the ip forwarding is enabled, and it appears to be.
Can anyone help please?
thanks
  Reply
#2
Before we get to networking configuration, it's been noted in other threads that some mobile providers disable tethering by default, and you have to ask them to enable it.

What exactly did you do to enable a hotspot? I'd be looking at route and gateway settings, and whether you need to set up NAT.
  Reply
#3
(08-31-2021, 12:57 PM)wibble Wrote: Before we get to networking configuration, it's been noted in other threads that some mobile providers disable tethering by default, and you have to ask them to enable it.

I have used this SIM card in a couple of 4G routers and also in an Android phone using the Android "hotspot" feature and it worked fine.

(08-31-2021, 12:57 PM)wibble Wrote: What exactly did you do to enable a hotspot? I'd be looking at route and gateway settings, and whether you need to set up NAT.

1. settings -> wifi -> selected wifi network in use and selected "forget"

Now the phone has no wifi

2. turn off phone
3. insert SIM card
4. turn on phone
5. settings -> mobile -> Mobile Date slider to "on"
6. settings -> mobile -> Access Point Names -> + and set up the APN
7. terminal -> ping google.com then ctrl-c
8. settings -> wifi
wifi slider set to "on"
tap three dots
Turn On Wi-Fi Hotspot
Fill in network name and Password
Tap "Turn on"

Now another device can connect to the hotspot, and it cannot connect to the Internet.
  Reply
#4
I don't have a data-enabled SIM in it at the moment so I can't try it, but recent reports are that that method should work, at least in Mobian.
https://www.cnx-software.com/2021/08/08/...e-hotspot/
https://wiki.mobian-project.org/doku.php...-tethering
I'd guess that Arch should also work similarly. I don't know what that does with IPv6 though, which may be an issue with some mobile network providers. Have you installed a firewall that may be blocking things?
  Reply
#5
(09-06-2021, 12:41 PM)wibble Wrote: Have you installed a firewall that may be blocking things?
No. It's a default install. I didn't install anything.
  Reply
#6
This bug/missing feature perhaps, or a similar corner case that's not handled yet?
https://gitlab.freedesktop.org/NetworkMa...issues/791

I'm not really up to giving a step by step introduction to network troubleshooting in a situation with as many moving parts as this.
  Reply
#7
Same here, though DNS queries do work. This seems to be the relevant commands:


Code:
] device (wlan0): supplicant interface state: disconnected -> completed
] device (wlan0): Activation: (wifi) Stage 2 of 5 (Device Configure) successful. Started Wi-Fi Hotspot "manjaro-arm"
] device (p2p-dev-wlan0): supplicant management interface state: disconnected -> completed
] device (wlan0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
] modprobe: '/sbin/modprobe --use-blacklist nf_nat_irc' exited with error 256 (modprobe: FATAL: Module nf_nat_irc not found in directory /lib/modules/5.14.8-2-MANJARO-ARM)
] modprobe: '/sbin/modprobe --use-blacklist nf_nat_sip' exited with error 256 (modprobe: FATAL: Module nf_nat_sip not found in directory /lib/modules/5.14.8-2-MANJARO-ARM)
] modprobe: '/sbin/modprobe --use-blacklist nf_nat_tftp' exited with error 256 (modprobe: FATAL: Module nf_nat_tftp not found in directory /lib/modules/5.14.8-2-MANJARO-ARM)
] modprobe: '/sbin/modprobe --use-blacklist nf_nat_pptp' exited with error 256 (modprobe: FATAL: Module nf_nat_pptp not found in directory /lib/modules/5.14.8-2-MANJARO-ARM)
] modprobe: '/sbin/modprobe --use-blacklist nf_nat_h323' exited with error 256 (modprobe: FATAL: Module nf_nat_h323 not found in directory /lib/modules/5.14.8-2-MANJARO-ARM)
] Executing: /usr/bin/iptables --table filter --insert INPUT --in-interface wlan0 --protocol tcp --destination-port 53 --jump ACCEPT
] Executing: /usr/bin/iptables --table filter --insert INPUT --in-interface wlan0 --protocol udp --destination-port 53 --jump ACCEPT
] Executing: /usr/bin/iptables --table filter --insert INPUT --in-interface wlan0 --protocol tcp --destination-port 67 --jump ACCEPT
] Executing: /usr/bin/iptables --table filter --insert INPUT --in-interface wlan0 --protocol udp --destination-port 67 --jump ACCEPT
] Executing: /usr/bin/iptables --table filter --insert FORWARD --in-interface wlan0 --jump REJECT
] Executing: /usr/bin/iptables --table filter --insert FORWARD --out-interface wlan0 --jump REJECT
] Executing: /usr/bin/iptables --table filter --insert FORWARD --in-interface wlan0 --out-interface wlan0 --jump ACCEPT
] Executing: /usr/bin/iptables --table filter --insert FORWARD --source 10.42.0.0/255.255.255.0 --in-interface wlan0 --jump ACCEPT
] Executing: /usr/bin/iptables --table filter --insert FORWARD --destination 10.42.0.0/255.255.255.0 --out-interface wlan0 --match state --state ESTABLISHED,RELATED --jump ACCEPT
] Executing: /usr/bin/iptables --table nat --insert POSTROUTING --source 10.42.0.0/255.255.255.0 ! --destination 10.42.0.0/255.255.255.0 --jump MASQUERADE
] Executing: /usr/bin/iptables --table filter --insert INPUT --in-interface wlan0 --protocol tcp --destination-port 53 --jump ACCEPT
] Executing: /usr/bin/iptables --table filter --insert INPUT --in-interface wlan0 --protocol udp --destination-port 53 --jump ACCEPT
] Executing: /usr/bin/iptables --table filter --insert INPUT --in-interface wlan0 --protocol tcp --destination-port 67 --jump ACCEPT
] Executing: /usr/bin/iptables --table filter --insert INPUT --in-interface wlan0 --protocol udp --destination-port 67 --jump ACCEPT
] Executing: /usr/bin/iptables --table filter --insert FORWARD --in-interface wlan0 --jump REJECT
] Executing: /usr/bin/iptables --table filter --insert FORWARD --out-interface wlan0 --jump REJECT
] Executing: /usr/bin/iptables --table filter --insert FORWARD --in-interface wlan0 --out-interface wlan0 --jump ACCEPT
] Executing: /usr/bin/iptables --table filter --insert FORWARD --source 10.42.0.0/255.255.255.0 --in-interface wlan0 --jump ACCEPT
] Executing: /usr/bin/iptables --table filter --insert FORWARD --destination 10.42.0.0/255.255.255.0 --out-interface wlan0 --match state --state ESTABLISHED,RELATED --jump ACCEPT
] Executing: /usr/bin/iptables --table nat --insert POSTROUTING --source 10.42.0.0/255.255.255.0 ! --destination 10.42.0.0/255.255.255.0 --jump MASQUERADE
] dnsmasq-manager: starting dnsmasq...
] device (wlan0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
] device (wlan0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
] device (wlan0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
] device (wlan0): Activation: successful, device activated.
  Reply
#8
I do not use your step 1. or step 7.
For step 8. I do Not turn on wifi... just tap the three dots to open hot spot window > add name & password > turn on

(Elsewhere on this forum they do mention the wifi must be turned off before activating the hot spot.)
      LINUX = CHOICES
         **BCnAZ**
               Idea
   Donate to $upport
your favorite OS Team
  Reply
#9
Hi I found that after turning on wifi hotspot (which required having wifi turned on) I needed to enable routing through the phone's. Here's the script I use for this, must be invoked with sudo:

Code:
#!/bin/bash
if [ "`whoami`" != root ]; then
    echo "You are not root"
    exit 1
fi
iptables -I INPUT 1 -s 10.42.0.0/24 -j ACCEPT
iptables -I OUTPUT 1 -s 10.42.0.0/24 -j ACCEPT
iptables -A POSTROUTING -t nat -j MASQUERADE -s 10.42.0.0/24

If I don't run this on the pinephone I get DNS on clients but no internet.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Wifi and bluetooth disabled on pinephone arch-phosh pineuser0 4 4,759 10-26-2021, 04:37 AM
Last Post: pineuser0
  "wifi adapter not found" in Settings after updating quantumphone 2 3,142 06-05-2021, 05:55 PM
Last Post: quantumphone
  wifi not working someGermanGuy 7 9,919 01-20-2021, 10:47 AM
Last Post: Enginerrrd

Forum Jump:


Users browsing this thread: 1 Guest(s)