Last active
April 25, 2017 21:29
-
-
Save atz/0fb87891dd11d291d282947e4607fed9 to your computer and use it in GitHub Desktop.
DNS/firewall/packetfilter issues w/ OSX, /etc/hosts file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# Host Database | |
# | |
# localhost is used to configure the loopback interface | |
# when the system is booting. Do not change this entry. | |
## | |
127.0.0.1 localhost | |
127.0.1.1 foobar.localhost | |
127.0.2.1 zubaz.localhost | |
127.0.3.1 foo.localhost | |
127.0.4.1 bar.localhost | |
255.255.255.255 broadcasthost | |
::1 localhost |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Administrators-MacBook-Pro-9:hyrax atz$ dig localhost | |
; <<>> DiG 9.8.3-P1 <<>> localhost | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3326 | |
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 | |
;; QUESTION SECTION: | |
;localhost. IN A | |
;; ANSWER SECTION: | |
localhost. 360000 IN A 127.0.0.1 | |
;; AUTHORITY SECTION: | |
localhost. 360000 IN NS localhost. | |
;; ADDITIONAL SECTION: | |
localhost. 360000 IN AAAA ::1 | |
;; Query time: 37 msec | |
;; SERVER: 171.64.1.234#53(171.64.1.234) | |
;; WHEN: Mon Apr 24 15:32:59 2017 | |
;; MSG SIZE rcvd: 85 | |
Administrators-MacBook-Pro-9:hyrax atz$ dig foobar | |
; <<>> DiG 9.8.3-P1 <<>> foobar | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 50301 | |
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 | |
;; QUESTION SECTION: | |
;foobar. IN A | |
;; AUTHORITY SECTION: | |
. 9882 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2017042402 1800 900 604800 86400 | |
;; Query time: 40 msec | |
;; SERVER: 171.64.1.234#53(171.64.1.234) | |
;; WHEN: Mon Apr 24 15:33:06 2017 | |
;; MSG SIZE rcvd: 99 | |
Administrators-MacBook-Pro-9:hyrax atz$ dig foobar.localhost | |
; <<>> DiG 9.8.3-P1 <<>> foobar.localhost | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 21918 | |
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 | |
;; QUESTION SECTION: | |
;foobar.localhost. IN A | |
;; AUTHORITY SECTION: | |
localhost. 360000 IN SOA localhost. hostmaster.stanford.edu. 100111103 360000 30000 3600000 360000 | |
;; Query time: 37 msec | |
;; SERVER: 171.64.1.234#53(171.64.1.234) | |
;; WHEN: Mon Apr 24 15:33:09 2017 | |
;; MSG SIZE rcvd: 93 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Crudely disabling pf on OSX fixed it:
sudo pfctl -d
Now to refine that into something less drastic.