deskoh / keycloak-kerberos

Keycloak integration with OpenLDAP and MIT Kerberos
17 stars 10 forks source link

nip.io and 127.0.0.1 #2

Open rstub opened 3 years ago

rstub commented 3 years ago

For me 127.0.0.1.nip.io does not work:

$ dig  127.0.0.1.nip.io 

; <<>> DiG 9.16.15-Debian <<>> 127.0.0.1.nip.io
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58706
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;127.0.0.1.nip.io.              IN      A

;; Query time: 4 msec
;; SERVER: 192.168.178.1#53(192.168.178.1)
;; WHEN: Fri Aug 20 20:24:25 CEST 2021
;; MSG SIZE  rcvd: 34

Most likely this is my router that also acts as DNS server that tries to be clever and I have not found a way to configure that. However, 127.0.1.1.nip.io gets past my router:

$ dig  127.0.1.1.nip.io 

; <<>> DiG 9.16.15-Debian <<>> 127.0.1.1.nip.io
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34716
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;127.0.1.1.nip.io.              IN      A

;; ANSWER SECTION:
127.0.1.1.nip.io.       431238  IN      A       127.0.1.1

;; Query time: 0 msec
;; SERVER: 192.168.178.1#53(192.168.178.1)
;; WHEN: Fri Aug 20 20:26:48 CEST 2021
;; MSG SIZE  rcvd: 61

After changing this name I got the set-up running. I understand this is a local problem, but others might be affected as well. I can provide a PR if you are interested.

deskoh commented 3 years ago

So what's the solution you have in mind?

rstub commented 3 years ago

I suggest to replace all instances of 127.0.0.1.nip.io (and one instance of localhost) with 127.0.1.1.nip.io. This should not change anything in the functionality, since both 127.0.0.1 and 127.0.1.1 are both loopback addresses.