1

I need to wildcard localhost for dev purpose and I'm really green on dns and network things.

With wildcard localhost I mean that I need to test my python and node.js applications with: localhost.dev, test.localhost.dev, etc.

I've followed this tutorial and every things seems to work correctly because of right ping:

~  ping -c 1 iam.the.walrus.dev
PING iam.the.walrus.dev (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.037 ms

--- iam.the.walrus.dev ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.037/0.037/0.037/0.000 ms

The dig command works too:

~  dig test.localhost.dev @127.0.0.1

; <<>> DiG 9.8.5-P1 <<>> test.localhost.dev @127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57911
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;test.localhost.dev.        IN  A

;; ANSWER SECTION:
test.localhost.dev. 0   IN  A   127.0.0.1

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Wed Nov 11 15:52:32 CET 2015
;; MSG SIZE  rcvd: 52

Now as I run

~  python -m SimpleHTTPServer 5000

and as I browse on http://localhost.dev:5000 in the python SimpleHTTPServer shell I see:

127.0.0.1 - - [11/Nov/2015 15:42:02] code 400, message Bad request syntax ('\x16\x03\x00\x00=\x01\x00\x009\x03\x00VCS\xba\xc3H\xf6\xf77\xa9\xa9\x93\xdf\xe0\xa5\x01\xce\xb1\x88\x9e9w\xd1\xab\xf3&\x8dbo\x1d\xe9\xdc\x00\x00\x12\x00\xff\x00/\x00\x05\x00\x04\x005\x00')
127.0.0.1 - - [11/Nov/2015 15:42:02] "=9VCS��H��7�����α��9wѫ�&�bo���/5" 400 -

What can it be? Any kind of help?

nkint
  • 153
  • 5

0 Answers0