garywill / linux-router

Set Linux as router in one command. Support Internet sharing, redsocks, Wifi hotspot, IPv6. Can also be used for routing VM/containers 🛰️
GNU Lesser General Public License v2.1
1.73k stars 153 forks source link

Does not appear to function with easytether. #56

Closed ZPfeffy closed 1 year ago

ZPfeffy commented 1 year ago

First, thanks for your time.

I have been trying to get my phone tethered to Ubuntu 22.04, and then have that laptop broadcast a wifi network for my other devices to connect to. I use EasyTether (https://www.google.com/search?channel=fs&client=ubuntu-sn&q=easytether) to bypass bandwidth restrictions from my cell phone. With EasyTether connected I tried several different methods of creating a hotspot, such as using the built-in feature, as well as linuxwifihotspot (https://github.com/lakinduakash/linux-wifi-hotspot/blob/master/src/scripts/README.md).

In every case the AP was created, devices could successfully join, but none of them were able to obtain internet access.

This led to me finding linux-router when I was at my wit's end, so I installed all the dependencies and got the program to run successfully, but once again with the same result. Successful creation of a network that does not provide Internet access to its clients. Output of the program below. Just hoping that someone might have some insight as to why that internet traffic doesn't appear to successfully make it to the devices on the access point.

OUTPUT sudo ./lnxrouter --ap wlo1 PfeffyTest -p Derp12345! --no-virt linux-router 0.6.7 (https://github.com/garywill/linux-router) Released under LGPL, with no warranty. Use on your own risk.

PID: 8963 Target interface is wlo1 (58:96:1d:ab:5f:27) PCI: 0000:00:14.3 Network controller [0280]: Intel Corporation Comet Lake PCH CNVi WiFi [8086:06f0] Use random LAN IPv4 address 192.168.11.1 Set wlo1 unmanaged by NetworkManager

haveged_watchdog PID: 9086

Starting hostapd hostapd PID: 9092 wlo1: interface state UNINITIALIZED->ENABLED wlo1: AP-ENABLED

iptables v1.8.7 (nf_tables) NOTICE: Not showing all operations done to iptables rules

iptables: NAT MASQUERADE all opt -- in out !wlo1 192.168.11.0/24 !-> 192.168.11.0/24 / lrt8963wlo1 / ACCEPT all opt -- in wlo1 out 192.168.11.0/24 -> 0.0.0.0/0 / lrt8963wlo1 / ACCEPT all opt -- in out wlo1 0.0.0.0/0 -> 192.168.11.0/24 / lrt8963wlo1 */ Loaded kernel module nf_nat_pptp

iptables: allow DNS ACCEPT tcp opt -- in wlo1 out 192.168.11.0/24 -> 192.168.11.1 tcp dpt:53 / lrt8963wlo1 / ACCEPT udp opt -- in wlo1 out 192.168.11.0/24 -> 192.168.11.1 udp dpt:53 / lrt8963wlo1 /

iptables: allow dhcp ACCEPT udp opt -- in wlo1 out 0.0.0.0/0 -> 0.0.0.0/0 udp dpt:67 / lrt8963wlo1 */

Starting dnsmasq Apr 6 11:23:52 dnsmasq[9129]: started, version 2.86 cachesize 150 Apr 6 11:23:52 dnsmasq[9129]: compile time options: IPv6 GNU-getopt DBus no-UBus i18n IDN2 DHCP DHCPv6 no-Lua TFTP conntrack ipset auth cryptohash DNSSEC loop-detect inotify dumpfile Apr 6 11:23:52 dnsmasq-dhcp[9129]: DHCP, IP range 192.168.11.10 -- 192.168.11.250, lease time 1h Apr 6 11:23:52 dnsmasq-dhcp[9129]: DHCP, sockets bound exclusively to interface wlo1 Apr 6 11:23:52 dnsmasq[9129]: reading /etc/resolv.conf Apr 6 11:23:52 dnsmasq[9129]: using nameserver 127.0.0.53#53 Apr 6 11:23:52 dnsmasq[9129]: cleared cache dnsmasq PID: 9129

== Setting up completed, now linux-router should be working == wlo1: STA 14:13:33:ff:cb:a3 IEEE 802.11: authenticated wlo1: STA 14:13:33:ff:cb:a3 IEEE 802.11: associated (aid 1) wlo1: AP-STA-CONNECTED 14:13:33:ff:cb:a3 wlo1: STA 14:13:33:ff:cb:a3 RADIUS: starting accounting session 17A53CA186E731D6 wlo1: STA 14:13:33:ff:cb:a3 WPA: pairwise key handshake completed (RSN) wlo1: EAPOL-4WAY-HS-COMPLETED 14:13:33:ff:cb:a3 Apr 6 11:24:41 dnsmasq-dhcp[9129]: DHCPDISCOVER(wlo1) 14:13:33:ff:cb:a3 Apr 6 11:24:41 dnsmasq-dhcp[9129]: DHCPOFFER(wlo1) 192.168.11.204 14:13:33:ff:cb:a3 Apr 6 11:24:41 dnsmasq-dhcp[9129]: DHCPDISCOVER(wlo1) 14:13:33:ff:cb:a3 Apr 6 11:24:41 dnsmasq-dhcp[9129]: DHCPOFFER(wlo1) 192.168.11.204 14:13:33:ff:cb:a3 Apr 6 11:24:42 dnsmasq-dhcp[9129]: DHCPREQUEST(wlo1) 192.168.11.204 14:13:33:ff:cb:a3 Apr 6 11:24:42 dnsmasq-dhcp[9129]: DHCPACK(wlo1) 192.168.11.204 14:13:33:ff:cb:a3 steamdeck ^Cwlo1: interface state ENABLED->DISABLED wlo1: AP-STA-DISCONNECTED 14:13:33:ff:cb:a3 wlo1: AP-DISABLED wlo1: CTRL-EVENT-TERMINATING

Doing cleanup.. nl80211: deinit ifname=wlo1 disabled_11b_rates=0 Apr 6 11:34:57 dnsmasq[9129]: exiting on receipt of SIGTERM Killed dnsmasq.pid 9129 dnsmasq Failed to kill haveged_watchdog.pid 9086 , it may have exited Killed keep_running.pid 9154 bash Undoing iptables changes .. Restore wlo1 managed by NetworkManager Exiting: This is the only running instance Cleaning up done

ZPfeffy commented 1 year ago

I have continued to play around, without any luck. My most recent attempt was:

sudo ./lnxrouter --ap wlo1 PfeffyTest -p Derp12345! -o tun-easytether --dns 1.1.1.1

Same results.