From: Matt Birkholz Date: Thu, 20 Nov 2025 22:39:00 +0000 (-0700) Subject: Modify the VBox DHCP server and statically configure front_addr. X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=8367dc78b7e02c5a538899f28bb5bd8460bf853e;p=Institute Modify the VBox DHCP server and statically configure front_addr. Rather than let the test Front machine use DHCP to get some simulated cloud-assigned IP address, statically configure it to the front_addr (outside the DHCP server's pool). --- diff --git a/README.org b/README.org index 74d36fb..7ba676e 100644 --- a/README.org +++ b/README.org @@ -747,7 +747,7 @@ the institute's Internet domain name. #+CAPTION: [[file:public/vars.yml][=public/vars.yml=]] #+BEGIN_SRC conf :tangle public/vars.yml -front_addr: 192.168.15.3 +front_addr: 192.168.15.4 #+END_SRC The example address is a private network address because the example @@ -2143,7 +2143,7 @@ PostUp = resolvectl dns %i 192.168.56.1 PostUp = resolvectl domain %i small.private [Peer] -EndPoint = 192.168.15.3:39608 +EndPoint = 192.168.15.4:39608 PublicKey = S+6HaTnOwwhWgUGXjSBcPAvifKw+j8BDTRfq534gNW4= AllowedIPs = 10.177.87.1 AllowedIPs = 192.168.56.0/24 @@ -3637,7 +3637,7 @@ PostUp = wg set %i private-key /etc/wireguard/private-key # Front [Peer] -EndPoint = 192.168.15.3:39608 +EndPoint = 192.168.15.4:39608 PublicKey = S+6HaTnOwwhWgUGXjSBcPAvifKw+j8BDTRfq534gNW4= AllowedIPs = 10.177.87.1 AllowedIPs = 10.177.87.0/24 @@ -6831,6 +6831,7 @@ VBoxManage natnetwork add --netname public \ --network 192.168.15.0/24 \ --enable --dhcp on --ipv6 off VBoxManage natnetwork start --netname public +VBoxManage dhcpserver modify --network=public --lower-ip=192.168.15.5 VBoxManage hostonlyif create # vboxnet0 VBoxManage hostonlyif ipconfig vboxnet0 --ip=192.168.56.10 VBoxManage hostonlyif create # vboxnet1 @@ -6840,14 +6841,14 @@ VBoxManage hostonlyif ipconfig vboxnet2 --ip=192.168.58.1 #+END_SRC Note that only the NAT network ~public~ should have a DHCP server -enabled, and it should not lease ~192.168.15.3~. This works, so far. -The VirtualBox DHCP service seems to start assigning IPs beginning -with ~192.168.15.5~. It is not simply disabled because Gate is -expecting the service from its ISP. +enabled (to simulate an ISP and cloud for ~gate~ and ~front~ +respectively). Yet ~front~ is statically assigned an IP address +outside the DHCP server's pool. This ensures it gets ~front_addr~ +without more server configuration. Note also that actual ISPs and clouds will provide Gate and Front with public network addresses. In this simulation "they" provide addresses -on the private ~192.168.15.0/24~ NAT network. +in ~192.168.15.0/24~, on the NAT network ~public~. ** The Test Machines @@ -7101,7 +7102,7 @@ iface lo inet loopback # The primary network interface auto enp0s3 iface enp0s3 inet static - address 192.168.15.3/24 + address 192.168.15.4/24 gateway 192.168.15.1 # Testing interface @@ -7385,7 +7386,7 @@ forwarding (and NATing). On ~core~ (and ~gate~): #+BEGIN_SRC sh ping -c 1 8.8.4.4 # dns.google -ping -c 1 192.168.15.3 # front_addr +ping -c 1 192.168.15.4 # front_addr #+END_SRC ~gate~ and thus ~core~ should be able to resolve internal and public @@ -7810,7 +7811,7 @@ seen. - Find it in =/home/dick/Maildir/new/=. - Re-configure Evolution on ~dick~. Edit the ~dick@small.example.org~ mail account (or create a new one?) so that the Receiving Email - Server name is ~192.168.15.3~, not ~mail.small.private~. The + Server name is ~192.168.15.4~, not ~mail.small.private~. The latter domain name will not work while the campus is disappeared. In actual use (with Front, not ~front~), the institute domain name could be used. diff --git a/private/core-wg0.conf b/private/core-wg0.conf index 34d8734..09519c4 100644 --- a/private/core-wg0.conf +++ b/private/core-wg0.conf @@ -4,7 +4,7 @@ PostUp = wg set %i private-key /etc/wireguard/private-key # Front [Peer] -EndPoint = 192.168.15.3:39608 +EndPoint = 192.168.15.4:39608 PublicKey = S+6HaTnOwwhWgUGXjSBcPAvifKw+j8BDTRfq534gNW4= AllowedIPs = 10.177.87.1 AllowedIPs = 10.177.87.0/24 diff --git a/private/test-front-prep b/private/test-front-prep index 69b3574..ab3ca38 100755 --- a/private/test-front-prep +++ b/private/test-front-prep @@ -39,7 +39,7 @@ iface lo inet loopback # The primary network interface auto enp0s3 iface enp0s3 inet static - address 192.168.15.3/24 + address 192.168.15.4/24 gateway 192.168.15.1 # Testing interface diff --git a/public/vars.yml b/public/vars.yml index 5a72f1f..0f8d819 100644 --- a/public/vars.yml +++ b/public/vars.yml @@ -1,6 +1,6 @@ --- domain_name: small.example.org -front_addr: 192.168.15.3 +front_addr: 192.168.15.4 full_name: Small Institute LLC