Re: Two NICs in Single BOX and two separate network connection handling

From: infoomatic <infoomatic_at_gmx.at>
Date: Tue, 28 Jun 2022 17:35:53 UTC
On 28.06.22 19:21, KK CHN wrote:
> Q1:  What are the configurations I need to make in the two NIC cards
> to achieve the requirement specified in   1 and 2.

setup your network cards with ifconfig, see
https://docs.freebsd.org/en/books/handbook/config/#config-network-setup,
especially 12.5.2


> Q2. What will be the  gateway configurations  needed to add to
> achieve  these two use cases in a single box?

on your interface connected to the LAN, either have dhcpd running so
your client computers get their IPv4 address and the default gateway as
well as nameserver. Or configure your clients with static IP addresses
and manual gateway/nameserver configuration, see answer to Q1.

You also want your machine to do network address translation, see
https://docs.freebsd.org/en/books/handbook/advanced-networking/
especially 32.2.2 and
https://docs.freebsd.org/en/books/handbook/firewalls/ especially 31.3.1
and 31.3.2.1