Hi, I’m a new user joining the Vyos community.
Today I would like to share about Redirect Hard-coded DNS To Specifics Server.
This configuration will allow you to manage users not to allow them to change DNS at their computer or phone, interfere with work, or monitor children.
As for the configuration, it is divided into 2 parts and is concentrated in NAT.
No more rambling here is the configuration:
nat {
destination {
rule 100 {
description “Captive DNS”
destination {
address !10.100.100.1 → Change DNS address (optional)
port 53
}
inbound-interface eth4
protocol tcp_udp
source {
address !10.100.100.1 → Change DNS address (optional)
}
translation {
address 10.100.100.1 → Change DNS address (optional)
port 53
}
}
}nat {
soure {
rule 101 {
destination {
address 10.100.100.1 → Change DNS address (optional)
port 53
}
outbound-interface eth4
protocol tcp_udp
source {
address 10.100.100.2-10.100.100.254 (*)
port 53
}
translation {
address masquerade
}
(*): Change the LAN address according to your configuration.