News for hackers. Stuff that matters.
Re:Buying a single character domain – and 3 character FQDN –... by snthd on Saturday August 15, 2020 @11:14AM (#24169436)
Is http://. possible?
Re:Buying a single character domain – and 3 character FQDN –... by unicodepepper on Saturday August 15, 2020 @11:41AM (#24169644)
Apparently it is possible to do it with local DNS resolution, using your hosts file Not sure how possible it would be on a remote DNS server, or whose authority you'd need to actually do it.

[root@host ~]$ curl -v http://.

* About to connect() to . port 80 (#0)

* Trying 127.0.0.1...

* Connected to . (127.0.0.1) port 80 (#0)

> GET / HTTP/1.1

> User-Agent: curl/7.29.0

> Host: .

> Accept: /

>

< HTTP/1.1 400 Bad Request

< Date: Sat, 15 Aug 2020 15:38:54 GMT

< Server: Apache

< Content-Length: 347

< Connection: close

< Content-Type: text/html; charset=iso-8859-1

<

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

<html><head>

<title>400 Bad Request</title>

</head><body>

<h1>Bad Request</h1>

<p>Your browser sent a request that this server could not understand.<br />

</p>

<p>Additionally, a 400 Bad Request

error was encountered while trying to use an ErrorDocument to handle the request.</p>

</body></html>

* Closing connection 0

Re:Buying a single character domain – and 3 character FQDN –... by parliament32 on Monday August 17, 2020 @12:43PM (#24188925)
Yes, if the root zone (".") published a CNAME or A record. You can simulate this yourself by setting your resolver as the master for "." and giving it an A record. Note that most webservers will barf if you try to send "." in the Host header unless you explicitly configured it.

    # cat named.conf.local
    zone "." {
     type master;
     file "/etc/bind/db.root";
    };

    # cat db.root 
    $TTL 60
    @ IN SOA localhost. root.localhost. (
             1  ; Serial
        604800  ; Refresh
         86400  ; Retry
       2419200  ; Expire
        604800 ) ; Negative Cache TTL
    ;
    @ IN NS .
    @ IN A 209.216.230.240

    # dig a .
    ...
    ;; QUESTION SECTION:
    ;.    IN A
    ;; ANSWER SECTION:
    .   60 IN A 209.216.230.240

    # wget http://./ 
    --2020-08-17 09:38:26--  http://./
    Resolving . (.)... 209.216.230.240
    Connecting to . (.)|209.216.230.240|:80... connected.
    HTTP request sent, awaiting response... 400 Bad Request
    2020-08-17 09:38:26 ERROR 400: Bad Request.
Re:Buying a single character domain – and 3 character FQDN –... by ricardo81 on Saturday August 15, 2020 @01:18PM (#24170463)
Was my thoughts also.

Doing a dig, there are no A records for . but they do provide NS records obviously, for all the other TLDs to resolve.

Devilish detail is probably in the RFC and likely implementation specific also, as to whether they accept it is a valid request or fail before trying.

dig A .

; <<>> DiG 9.11.5-P4-5.1-Debian <<>> A . ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26280 ;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION: ;. IN A

;; Query time: 3 msec ;; SERVER: 192.168.1.254#53(192.168.1.254) ;; WHEN: Sat Aug 15 18:19:41 BST 2020 ;; MSG SIZE rcvd: 17