The DNS response spoofing service allows modifying IP addresses returned by the DNS server for specific domain names. This enables overriding IP addresses in server responses for certain types of DNS queries specified in the service configuration.
This service is effective for controlling client DNS requests and redirecting them to alternative IP addresses. It is used to balance traffic to certain resources between different servers based on IP address.
Supported DNS record types:
A
— IPv4 address (length — 32 bits);AAAA
— IPv6 address (length — 128 bits);MX
— txt-record containing information about mail servers handling mail.Possible actions for DNS queries:
ya.ru HTTPS #drop
— DPI drops the DNS query with HTTPS record typeya.ru A #nxdomain
— DPI sends a response indicating the domain does not existmail.ru MX smtp.googlemail.com
— in this case, for a query to mail.ru with MX
type, the response should indicate that mail.ru has a mail server at smtp.googlemail.com with a preference
of 10.*
are supported. vi test.txt google.com A 192.0.2.1 test.com A #nxdomain example.com AAAA 2001:db8:85a3::8a2e:370:7334 yahoo.com HTTPS #drop *.fb.com A 203.0.113.5 outlook.com MX smtp.googlemail.com
dns2dic
utility, which is readable by DPI:cat test.txt|dns2dic test.bin
cp test.bin /var/lib/dpi/dns.bin
fdpi_ctrl load profile --service 19 --profile.name test_193 --profile.json '{ "dns_list" : "/var/lib/dpi/dns.bin" }'
max_profiles_serv19
— setting for the maximum number of profiles. Default is 32.
fastdpi.conf
with the parameter emit_direction=2
Command format:
fdpi_ctrl [command] --service 19 [options list] [login or vchannel]
Enable the service:
fdpi_ctrl load --service 19 --profile.name test_193 --login test #or fdpi_ctrl load --service 19 --profile.name test_193 --vchannel 1
Disable the service:
fdpi_ctrl del --service 19 --profile.name test_193 --login test #or fdpi_ctrl del --service 19 --profile.name test_193 --vchannel 1