Set Linux as router in one command. Support Internet sharing, redsocks, Wifi hotspot, IPv6. Can also be used for routing VM/containers 🛰️ (也欢迎关注B站 https://space.bilibili.com/2123686105 )
PID: 4527
Target interface is wlan0 (08:e9:f6:5b:d0:4a)
Use random LAN IPv4 address 192.168.168.1
wlan0 already in channel 157 (5785 MHz)
Channel fallback to 157
Creating a virtual WiFi interface...
x0wlan0 created
Set x0wlan0 unmanaged by NetworkManager
Assigning MAC address 08:e9:f6:5b:d0:54 to virtual interface x0wlan0 according to wlan0 ...
haveged_watchdog PID: 4705
Starting hostapd
hostapd PID: 4710
Configuration file: /dev/shm/lnxrouter_tmp/lnxrouter.wlan0.conf.Su2GtA/hostapd.conf
Using interface x0wlan0 with hwaddr 08:e9:f6:5b:d0:54 and ssid "epcom"
x0wlan0: interface state UNINITIALIZED->ENABLED
x0wlan0: AP-ENABLED
iptables v1.6.1
NOTICE: Not showing all operations done to iptables rules
iptables: NAT
*### MASQUERADE all opt -- in out !x0wlan0 192.168.168.0/24 !-> 192.168.168.0/24 / lrt4527x0wlan0 /
iptables: No chain/target/match by that name.
Error occured**
Doing cleanup..
./lnxrouter: line 755: 4735 Terminated sleep 2
Killed haveged_watchdog.pid 4705 lnxrouter
x0wlan0: interface state ENABLED->DISABLED
x0wlan0: AP-DISABLED
nl80211: deinit ifname=x0wlan0 disabled_11b_rates=0
Killed hostapd.pid 4710 hostapd
Undoing iptables changes ..
iptables: No chain/target/match by that name.
Exiting: This is the only running instance
Cleaning up done
hdxt@Mate-HDXT:~/linux-router$ Error occured
ERROR: hostapd failed
./lnxrouter: line 1215: kill: (4527) - No such process
Doing cleanup..
Undoing iptables changes ..
Exiting: This is the only running instance
Cleaning up done
linux-router 0.6.6 (https://github.com/garywill/linux-router) Released under LGPL, with no warranty. Use on your own risk.
PID: 4527 Target interface is wlan0 (08:e9:f6:5b:d0:4a) Use random LAN IPv4 address 192.168.168.1 wlan0 already in channel 157 (5785 MHz) Channel fallback to 157 Creating a virtual WiFi interface... x0wlan0 created Set x0wlan0 unmanaged by NetworkManager Assigning MAC address 08:e9:f6:5b:d0:54 to virtual interface x0wlan0 according to wlan0 ...
haveged_watchdog PID: 4705
Starting hostapd hostapd PID: 4710 Configuration file: /dev/shm/lnxrouter_tmp/lnxrouter.wlan0.conf.Su2GtA/hostapd.conf Using interface x0wlan0 with hwaddr 08:e9:f6:5b:d0:54 and ssid "epcom" x0wlan0: interface state UNINITIALIZED->ENABLED x0wlan0: AP-ENABLED
iptables v1.6.1 NOTICE: Not showing all operations done to iptables rules
iptables: NAT *### MASQUERADE all opt -- in out !x0wlan0 192.168.168.0/24 !-> 192.168.168.0/24 / lrt4527x0wlan0 / iptables: No chain/target/match by that name. Error occured**
Doing cleanup.. ./lnxrouter: line 755: 4735 Terminated sleep 2 Killed haveged_watchdog.pid 4705 lnxrouter x0wlan0: interface state ENABLED->DISABLED x0wlan0: AP-DISABLED nl80211: deinit ifname=x0wlan0 disabled_11b_rates=0 Killed hostapd.pid 4710 hostapd Undoing iptables changes .. iptables: No chain/target/match by that name. Exiting: This is the only running instance Cleaning up done hdxt@Mate-HDXT:~/linux-router$ Error occured
ERROR: hostapd failed
./lnxrouter: line 1215: kill: (4527) - No such process
Doing cleanup.. Undoing iptables changes .. Exiting: This is the only running instance Cleaning up done