1

System Configuration

  1. eth0 NIC to the LAN/WAN/Internet (working, don't want to mess with it)
  2. eth1 NIC
  3. eth2 NIC

Objectives

  1. Assign a static IP to eth1 and eth2 and assign IPs (DHCP) on separate subnets to nodes on each adapter.
  2. Resolve and forward requests made to mydomainexample.com to the respective IP of each adapter they came in on. Requests will come in on an uncommon port and be directed to the same port (/etc/hosts or a true DNS server).

Progress

DHCP Attempts Thus Far: Making edits to /etc/dhcp/dhcp.conf I am confident the IP settings are okay but want to confirm the appropriate DNS and domain settings.

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.1 192.168.1.1;
interface eth1;
#  option domain-name-servers ns1.internal.example.org;
#}

subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.1 192.168.2.1;
interface eth2;
#  option domain-name-servers ns1.internal.example.org;
#}

For the DNS resolution and forwarding it appears /etc/hosts edits and or iptables configurations are in order.

Something along the lines of this?:

iptables -i eth1 -t nat -A PREROUTING -p tcp --sport 53 -j DNAT --to-destination 192.168.1.0:11111

Also requests will be targeting a domain name, so should I be first redirecting to a DNS (or /etc/hosts/) on another IP that then resolves that domain to the adapter IP address?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.