Spoofing DNS: Difference between revisions
Jump to navigation
Jump to search
(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...") |
mNo edit summary |
||
Line 4: | Line 4: | ||
$ echo "foo www.google.com" >> ~/.hosts | $ echo "foo www.google.com" >> ~/.hosts | ||
$ HOSTALIASES=~/.hosts | $ HOSTALIASES=~/.hosts | ||
$ | $ curl foo | ||
</pre> | </pre> | ||
man hostname(7) | man hostname(7) |
Latest revision as of 16:10, 29 July 2022
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 $ curl foo
man hostname(7)