Computer A accesses internet through wifi interface
wlp2s0 connected to a router (Internet).
- WAN network
- Only responds to Computer A's MAC address DHCP discover requests
Computer A's second network interface
enp3s0 is used by Computer B reach out Internet through the A's NAT.
- LAN network
Computer B uses this connection to access Internet. For this,
dnsmasq is running as DHCP server on computer A with configuration to listen on any interfaces over than
How do I remove wifi interface from this setup to only use
enp3s0 - with switch?
Current config (Computer A)
Ubuntu 18.04 is installed on Computer A.
netplan does not handle
enp3s0, it its configured manually during boot:
iptables -t nat -A POSTROUTING -j MASQUERADE sysctl -w net.ipv4.ip_forward=1 ip link set enp3s0 up ip addr add 192.168.4.50/24 dev enp3s0
And then dnsmasq starts to listen on this interface with appropriate subnet in its config.
What are config options for
dnsmasq to prevent
DHCP server interfering with
DHCP client on the same interface?
Since i will need to remove the above script i assume and configure Netplan with
dhcpd4: true for interface
enp3s0 to obtain Computer A Internet connection with DHCP request, there must be a way to:
- Prevent dnsmasq (A) to respond to requests from its own host (A)
- Configure correct IP address on
enp3s0to work in two networks under two different IPs (?)
- No more ethernet interface on A over than