DNS Redirector Setup

DNS-Redirector-Setup.txt
https://www.coresecurity.com/core-labs/articles/simple-dns-redirectors-cobalt-strike

Tested on Ubuntu 18.04 LTS
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -m state --state NEW --protocol udp --destination my.ip.address --destination-port 53 -j MARK --set-mark 0x400
iptables -t nat -A PREROUTING -m mark --mark 0x400 --protocol udp -j DNAT --to-destination teamserver.ip:53
iptables -t nat -A POSTROUTING -m mark --mark 0x400 -j MASQUERADE

Last updated

Was this helpful?