Are you looking to set up distinct DNS for two VLANs using Dnsmasq and Fresh Tomato? Look no further! In this guide, we will walk you through the process step by step.
What is Dnsmasq?
Dnsmasq is a lightweight DNS forwarder and DHCP server that is commonly used in small networks. It provides DNS caching and can also act as a DHCP server to assign IP addresses to devices on your network.
What is Fresh Tomato?
Fresh Tomato is a third-party firmware for routers that is based on the Tomato firmware. It offers advanced features and customization options not found in the stock firmware provided by router manufacturers.
Setting up VLANs
The first step is to set up VLANs on your router using Fresh Tomato. VLANs allow you to segment your network into multiple virtual LANs, each with its own set of devices and configurations.
To set up VLANs, follow these steps:
- Access the Fresh Tomato router administration interface by entering the router's IP address in your web browser.
- Navigate to the "Advanced" tab and then click on "VLAN" in the left sidebar.
- Click on the "Add" button to create a new VLAN.
- Enter a name for the VLAN and select the desired port(s) that will be associated with the VLAN. Click "Save" to create the VLAN.
- Repeat the above steps to create another VLAN if needed.
Configuring Dnsmasq
Once you have set up the VLANs, you can configure Dnsmasq to provide distinct DNS for each VLAN.
Here's how to configure Dnsmasq:
- Access the Fresh Tomato router administration interface.
- Navigate to the "Services" tab and then click on "Services" in the left sidebar.
- Scroll down to the "DNSMasq" section and click on the "Enable" checkbox.
- In the "Additional DNSMasq Options" box, enter the following configuration:
dhcp-option=tag:VLAN1,6,192.168.1.1
dhcp-option=tag:VLAN2,6,192.168.2.1
Replace "VLAN1" and "VLAN2" with the names of your VLANs, and "192.168.1.1" and "192.168.2.1" with the desired DNS servers for each VLAN.
Applying VLAN Tags
Finally, you need to apply VLAN tags to the devices connected to your router.
Follow these steps to apply VLAN tags:
- Access the Fresh Tomato router administration interface.
- Navigate to the "Advanced" tab and then click on "VLAN" in the left sidebar.
- Find the device you want to assign a VLAN tag to and click on the "Edit" button.
- In the "VLAN ID" field, enter the VLAN ID associated with the desired VLAN.
- Click "Save" to apply the VLAN tag to the device.
- Repeat the above steps for other devices as needed.
That's it! You have successfully set up distinct DNS for two VLANs using Dnsmasq and Fresh Tomato. Now each VLAN will have its own DNS server configuration.
References
| Source | Link |
|---|---|
| Super User - Distinct DNS for two VLANs using Dnsmasq and Fresh Tomato | https://superuser.com/q/1769517 |