How to setup internet connection sharing on second subnet
0
votes
1
answer
323
views
I have a problem with the usage of a pxe server and internet sharing to work together.
In first place, I had only one network adapter and used DNSMASQ, every time I had to install a computer's OS. I had to disable DNSMASQ in order that other users on the same ISP router still have internet.
Now that I have a second network adapter, I tried to setup the PXE server using ICS-DHCP, without DNSMASQ. But I got stuck with the internet sharing on the PXE client.
Information:
ISP router IP: 192.168.1.1
Ubuntu server static IP: 192.168.1.19 -> Connected on the ISP router
Second adapter static IP for pxe install and internet sharing on it, uses 192.168.0.1
My question is, "How can I make all to computers connected to the ISP router continue working, while the server (connected to the same router with eth0), to deploy the PXE files and share the net over the second adapter, connected directly to the computer that needs its system installation?
The problem seems to be that the default gateway can't be set for another subnet.
Can I route the gateway itself ? If so, how ?
**cat /etc/network/interfaces :**
auto lo
iface lo inet loopback
auto eth0
allow-hotplug enp5s0
iface enp5s0 inet static
address 192.168.1.19
netmask 255.255.255.0
gateway 192.168.1.1
auto eth1
allow-hotplug enp7s4f1
iface enp7s4f1 inet static
address 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0/24
broadcast 192.168.0.255
**dhcpd.conf**
ffDHCPDARGS=enp7s4f1;
default-lease-time 86400;
max-lease-time 604800;
authoritative;
ddns-update-style none;
allow unknown-clients;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.2 192.168.0.10;
filename "pxelinux.0";
option subnet-mask 255.255.255.0;
}
**nmcli d**
DEVICE TYPE STATE CONNECTION
enp5s0 ethernet connecté server
enp7s4f1 ethernet connecté pxe-client
**/etc/default/tftpd-hpa**
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/lib/tftpboot"
TFTP_ADDRESS="192.168.0.1:69"
TFTP_OPTIONS="--secure"
RUN_DAEMON="yes"
After installing a Windows 10 with the PXE server, I didn't have internet on the new computer. But I could access all other services, like samba shares for example.
Asked by user330163
Mar 10, 2022, 03:56 AM
Last activity: Mar 11, 2022, 08:09 AM
Last activity: Mar 11, 2022, 08:09 AM