I am a computing teacher, I am trying to setup a "sandbox" network with internet access for an after school computing club.
I have an old PC (Debian 11 installation) with 2 ethernet interfaces, one interface is connected to the standard school network. This is used to be used to transfer internet traffic to the second interface. The second interface will provide dhcp & internet to a small classroom network. Devices such as laptops & Raspberry Pi's will be connected to this switch, at some point a WiFi access point too.
Below is the physical setup. enp2s0 is connected to school and enp3s0 is connected to my computing network.
ser@computingClubBridge:~$ ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 34:64:a9:24:01:55 brd ff:ff:ff:ff:ff:ff
inet 10.202.248.250/21 brd 10.202.255.255 scope global dynamic enp2s0
valid_lft 621249sec preferred_lft 621249sec
inet 10.202.248.240/21 brd 10.202.255.255 scope global secondary enp2s0
valid_lft forever preferred_lft forever
inet6 fe80::3664:a9ff:fe24:155/64 scope link
valid_lft forever preferred_lft forever
3: enp3s0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:e0:4c:69:1f:cd brd ff:ff:ff:ff:ff:ff
inet 169.254.151.221/16 brd 169.254.255.255 scope global enp3s0
valid_lft forever preferred_lft forever
inet6 fe80::2e0:4cff:fe69:1fcd/64 scope link
valid_lft forever preferred_lft forever
I have been following this tutorial, however parts of it are out of date as it refers to dhcp3, so I have replaced this with isc-dhcp-server.
https://www.debuntu.org/how-to-set-up-a-lan-gateway-with-dhcp-dynamic-dns-and-iptables-on-debian-etch-page-3-dhcp-server/
/etc/default/isc-dhcp-server is currently:
Defaults for isc-dhcp-server (sourced by /etc/init.d/isc-dhcp-server)
# Path to dhcpd's config file (default: /etc/dhcp/dhcpd.conf).
DHCPDv4_CONF=/etc/dhcp/dhcpd.conf
#DHCPDv6_CONF=/etc/dhcp/dhcpd6.conf
# Path to dhcpd's PID file (default: /var/run/dhcpd.pid).
#DHCPDv4_PID=/var/run/dhcpd.pid
#DHCPDv6_PID=/var/run/dhcpd6.pid
# Additional options to start dhcpd with.
# Don't use options -cf or -pf here; use DHCPD_CONF/ DHCPD_PID instead
#OPTIONS=""
# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
# Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACESv4="enp3s0"
INTERFACESv6=""
In order to try to make the sub-net work I have simplified the dhcp.conf file from that in the tutorial in /etc/dhcp to :
subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.5 192.168.2.200;
option routers router.lan.computing.local;
}
However restarting isc-dhcp-server does not work. Syslog shows the following message.
Nov 17 11:54:45 computingClubBridge dhcpd[8828]: No subnet declaration for enp3s0 (169.254.151.221).
Nov 17 11:54:45 computingClubBridge dhcpd[8828]: ** Ignoring requests on enp3s0. If this is not what
Nov 17 11:54:45 computingClubBridge dhcpd[8828]: you want, please write a subnet declaration
Nov 17 11:54:45 computingClubBridge dhcpd[8828]: in your dhcpd.conf file for the network segment
Nov 17 11:54:45 computingClubBridge dhcpd[8828]: to which interface enp3s0 is attached. **
Nov 17 11:54:45 computingClubBridge dhcpd[8828]:
Nov 17 11:54:45 computingClubBridge dhcpd[8828]:
Nov 17 11:54:45 computingClubBridge dhcpd[8828]: Not configured to listen on any interfaces!
Nov 17 11:54:45 computingClubBridge dhcpd[8828]:
Nov 17 11:54:45 computingClubBridge dhcpd[8828]: If you think you have received this message due to a bug rather
Nov 17 11:54:45 computingClubBridge dhcpd[8828]: than a configuration issue please read the section on submitting
Nov 17 11:54:45 computingClubBridge dhcpd[8828]: bugs on either our web page at www.isc.org or in the README file
Nov 17 11:54:45 computingClubBridge dhcpd[8828]: before submitting a bug. These pages explain the proper
Nov 17 11:54:45 computingClubBridge dhcpd[8828]: process and the information we find helpful for debugging.
Nov 17 11:54:45 computingClubBridge dhcpd[8828]:
Nov 17 11:54:45 computingClubBridge dhcpd[8828]: exiting.
Nov 17 11:54:47 computingClubBridge isc-dhcp-server[8812]: Starting ISC DHCPv4 server: dhcpdcheck syslog for diagnostics. ...
Nov 17 11:54:47 computingClubBridge isc-dhcp-server[8833]: failed!
Nov 17 11:54:47 computingClubBridge isc-dhcp-server[8834]: failed!
Nov 17 11:54:47 computingClubBridge systemd[1]: isc-dhcp-server.service: Control process exited, code=exited, status=1/FAILURE
Nov 17 11:54:47 computingClubBridge systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'.
Nov 17 11:54:47 computingClubBridge systemd[1]: Failed to start LSB: DHCP server.
I do not know any way to try to progress further, as far as I can see I have declared a subnet for the network interface using an example isc-dhcp-server config however DHCP does not want to use it?