0

I've got one Linux PC connected to the Internet but I want to connect more devices to the PC using TCP/IP but I don't want the router to act as a DHCP Server for them. I mean, I don't want the router to assign IP adresses to these devices. Due to cybersecurity issues I want to create a separate LAN for the devices. They will communicate with the PC and this one will publish data on the Internet. So I would have here two LANs, the router + PC with Internet and the devices with the same PC.

Can I do this without a second router? How can I create this network from the PC? How can I set the PC to act as a DHCP Server at the same time it has an IP adress from another LAN to have Internet connection??

1
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.
    – Community Bot
    Sep 14, 2022 at 10:27

1 Answer 1

0

Add a second Ethernet port to your computer:

  1. If the computer only has one Ethernet port – buy a PCI-Express Ethernet card, install it in the computer and connect your devices to the newly installed 2nd port. (USB Ethernet adapters will also work, but slightly less reliably.)

  2. Your main LAN is now eth0, the new port is eth1 (or similar). Configure a static IP address on eth1 – this must be a different subnet from the main LAN subnet.

  3. Install a DHCP server (e.g. Dnsmasq or ISC dhcpd) and configure it to run on eth1, offering IP addresses from the new eth1 subnet.

At this point, it's also easy to enable IP forwarding on Linux – turning it into a router – if you want.

There are several other ways to isolate devices – e.g. a single router could easily manage several independent LANs, with firewall rules restricting traffic in specific directions only.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .