Spoofing DNS

From Public wiki of Kevin P. Inscoe
Revision as of 16:09, 29 July 2022 by Ah2l671Liu8Hah$K2eit (talk | contribs) (Created page with "If you don't have root (I do but didn't want to change /etc/resolv.conf for this) and you want to override DNS choices (spoof testing or such) I present you: <pre> $ echo "fo...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

If you don't have root (I do but didn't want to change /etc/resolv.conf for this) and you want to override DNS choices (spoof testing or such) I present you:

$ echo "foo www.google.com" >> ~/.hosts
$ HOSTALIASES=~/.hosts
$ wget foo

man hostname(7)