0

I have small nettop with Ubuntu Server 19.04 on it. On one side, a USB modem is connected (Huawei e5785) with network interface eth_lte. On other side ens2 - 5-port switch where are several computers connected.

I want to configure my nettop as a router. Here is my netplan config:

network:
  version: 2
  renderer: networkd
  ethernets:
    eth_lte:
      addresses:
        - 192.168.8.2/24
      gateway4: 192.168.8.1
      nameservers:
        addresses: [1.1.1.1, 8.8.8.8]
      match:
        macaddress: 0c:5b:8f:27:9a:64
      set-name: eth_lte
    ens2:
      dhcp4: no
      addresses:
        - 172.16.10.1/24

isc-dhcp-server is also configured

default-lease-time 600;
max-lease-time 7200;
authoritative;
log-facility local7;

shared-network cable {

  subnet 172.16.10.0 netmask 255.255.255.0 {
    range 172.16.10.10 172.16.10.254;
    option domain-name-servers 172.16.10.1, 1.1.1.1, 8.8.8.8;
    option routers 172.16.10.1;
    option time-servers 172.16.10.1;
    option broadcast-address 172.16.10.255;
    default-lease-time 600;
    max-lease-time 7200;
  }
}

At this point internet is working on nettop, computers successfully receive ip address.

How can i share internet connection on eth_lte to ens2? Make a bridge in netplan? Or i need to configure some routes? I'm new to this, trying to figure out how the network works.

  • it seems the only thing I need to do is configure iptables – Digital God Nov 7 at 11:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.