GraseHotspot / grase-www-portal

Grase WWW Portal (Main Package)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing in documentation

cchamb2 opened this issue · comments

Ubuntu uses netplan for NIC management by defaut.

When Ubuntu 18.04 Server is installed, it configures one NIC (the NIC with Internet access) but ignores the other NIC (the NIC going to the wifi access point).

No NIC = no LAN connection for wifi access point.

The documentation should include instructions on how to set up the second NIC under netplan.

@cchamb2 We actually don't want netplan to touch the NIC. So far in my testing netplan hasn't touched the second NIC, so things are working correctly. I'll add documentation for how to stop netplan touching the NIC if it's already done something to it.
CoovaChilli will handle setting up the second NIC through the tunnel it creates (normally tun0)

That's to be expected. Until CoovaChilli is running correctly, ifconfig won't show you the interface (as it's in a down state). ifconfig -a should show it though.
In the current V4 packages, make sure you head to /grase/settings/advanced/ and set the networkLanInterface and networkWanInterface correctly otherwise CoovaChilli won't start.

For example, my test VM before CoovaChilli has started shows the following (showing ifconfig -a will show all the network interfaces. Note that ens9 is missing the UP flag)

$ ifconfig
ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.2.66  netmask 255.255.255.0  broadcast 192.168.2.255
        inet6 fe80::5054:ff:fe83:3d7c  prefixlen 64  scopeid 0x20<link>
        ether 52:54:00:83:3d:7c  txqueuelen 1000  (Ethernet)
        RX packets 764  bytes 144722 (144.7 KB)
        RX errors 0  dropped 70  overruns 0  frame 0
        TX packets 323  bytes 150981 (150.9 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 112  bytes 9096 (9.0 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 112  bytes 9096 (9.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

$ ifconfig -a
ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.2.66  netmask 255.255.255.0  broadcast 192.168.2.255
        inet6 fe80::5054:ff:fe83:3d7c  prefixlen 64  scopeid 0x20<link>
        ether 52:54:00:83:3d:7c  txqueuelen 1000  (Ethernet)
        RX packets 877  bytes 160720 (160.7 KB)
        RX errors 0  dropped 87  overruns 0  frame 0
        TX packets 365  bytes 156153 (156.1 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens9: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether 52:54:00:eb:3f:4a  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 112  bytes 9096 (9.0 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 112  bytes 9096 (9.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

After I configure networkLanInterface and networkWanInterface and the cronjob (runs every 5 minutes) picks up the change and configures dnsmasq and coovachilli correctly I get the following. ens9 now has the UP flag and no IP address, and tun0 is running with the LAN IP address.

$ ifconfig
ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.2.66  netmask 255.255.255.0  broadcast 192.168.2.255
        inet6 fe80::5054:ff:fe83:3d7c  prefixlen 64  scopeid 0x20<link>
        ether 52:54:00:83:3d:7c  txqueuelen 1000  (Ethernet)
        RX packets 1590  bytes 251306 (251.3 KB)
        RX errors 0  dropped 132  overruns 0  frame 0
        TX packets 681  bytes 193964 (193.9 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens9: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST>  mtu 1500
        inet6 fe80::5054:ff:feeb:3f4a  prefixlen 64  scopeid 0x20<link>
        ether 52:54:00:eb:3f:4a  txqueuelen 1000  (Ethernet)
        RX packets 11  bytes 940 (940.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 12  bytes 1266 (1.2 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 136  bytes 12398 (12.3 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 136  bytes 12398 (12.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

tun0: flags=81<UP,POINTOPOINT,RUNNING>  mtu 1500
        inet 10.1.0.1  netmask 255.255.255.0  destination 10.1.0.1
        inet6 fe80::1231:51bd:cff3:4f08  prefixlen 64  scopeid 0x20<link>
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 100  (UNSPEC)
        RX packets 9  bytes 813 (813.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 11  bytes 1066 (1.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

First run wizard mostly implemented (networking part is). https://grasehotspot.org/documentation/v4-nightly-builds/ has details about only setting up WAN interface. If we need, we can add netplan commands to docs as well.