GraseHotspot / grase-www-portal

Grase WWW Portal (Main Package)
52 stars 20 forks source link

Missing in documentation #186

Closed cchamb2 closed 4 years ago

cchamb2 commented 4 years ago

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.

timwhite commented 4 years ago

@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)

cchamb2 commented 4 years ago

The problem is that the second NIC isn't touched at all.  According to ifconfig, it's not there.

The complete output of ifconfig:

==================

charles@hotspot:~$ ifconfig enp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500         inet 192.168.0.200  netmask 255.255.255.0  broadcast 192.168.0.255         inet6 fe80::c225:e9ff:fe1d:bbfb  prefixlen 64  scopeid 0x20         inet6 2600:8800:7a00:3510:c225:e9ff:fe1d:bbfb  prefixlen 64  scopeid 0x0         ether c0:25:e9:1d:bb:fb  txqueuelen 1000  (Ethernet)         RX packets 592205  bytes 84614511 (84.6 MB)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 632554  bytes 92128217 (92.1 MB)         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         loop  txqueuelen 1000  (Local Loopback)         RX packets 94  bytes 8956 (8.9 KB)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 94  bytes 8956 (8.9 KB)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

==============

enp4s0 is the NIC connected to the router, with Internet access.  It's running on Ubunu Server 18.04, which only activates one NIC on installation.

The second NIC should show up as enp2s0.

There is no second NIC for connectivity to the access point.

Charlie

On 5/5/20 5:13 AM, Tim White wrote:

@cchamb2 https://github.com/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)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/GraseHotspot/grase-www-portal/issues/186#issuecomment-624018827, or unsubscribe https://github.com/notifications/unsubscribe-auth/AON5UY5FEMD5MXXFC5Q2OIDRP77HTANCNFSM4MXVWRVQ.

timwhite commented 4 years ago

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
timwhite commented 4 years ago

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.