Mobile app version of vmapp.org
Login or Join
Becky754

: Setup DNS with A and SRV records I have the following servers, which should be used for the following tasks: big_box 111.111.111.111 Main-Server (Game-Server, Virtual Machines,...) small_box 222.222.222.222

@Becky754

Posted in: #Dns #Domains #SrvRecords

I have the following servers, which should be used for the following tasks:

big_box 111.111.111.111 Main-Server (Game-Server, Virtual Machines,...)
small_box 222.222.222.222 Web-Server


The idea is later (if I get this to run) to add more "small_box" type servers for load balancing.

I own a domain and I tried to setup the following DNS entries:

Host TTL Type Preference Data
*.example.org 30 A 20 111.111.111.111
example.org 30 A 20 111.111.111.111
example.org 30 MX 20 mail.example.org
example.org 86400 NS 20 ns1.nameserver.org
example.org 86400 NS 20 ns1.nameserver.org
example.org 86400 NS 20 ns1.nameserver.org
_http._tcp.example.org. 30 SRV 10 10 80 222.222.222.222
_http._tcp.www.example.org. 30 SRV 10 10 80 222.222.222.222
_https._tcp.example.org. 30 SRV 10 10 443 222.222.222.222
_https._tcp.www.example.org. 30 SRV 10 10 443 222.222.222.222


I waited more than twenty-four hours to let the changes propagate and I can lookup the SRV entries with:

dig _http._tcp.exmaple.org


and get as answer:

; <<>> DiG 9.9.5-3ubuntu0.6-Ubuntu <<>> _http._tcp.example.org SRV
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45370
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 4

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;_http._tcp.exmaple.org. IN SRV

;; ANSWER SECTION:
_http._tcp.example.org. 30 IN SRV 10 10 80 222.222.222.222.

;; AUTHORITY SECTION:
example.org. 69477 IN NS ns2.nameserver.org.
example.org. 69477 IN NS ns1.nameserver.org.
example.org. 69477 IN NS ns3.nameserver.org.

;; ADDITIONAL SECTION:
ns1.nameserver.org. 2470 IN A xxx.xxx.xxx.xxx
ns2.nameserver.org. 977 IN A xxx.xxx.xxx.xxx
ns3.nameserver.org. 2470 IN A xxx.xxx.xxx.xxx

;; Query time: 32 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Tue Feb 02 02:18:13 CET 2016
;; MSG SIZE rcvd: 212


But when I am trying get the webpage under any of the following
example.org http://www.exampleuorg example.org https://www.example.org


I always end up on 111.111.111.111 instead of 222.222.222.222.

(I setup 4 small webpages on Apache2 servers, stating which machine under which protocol I reached.)

Also:

traceroute example.org
traceroute example.org
traceroute -p 80 example.org
traceroute -p 80 example.org
traceroute -p 443 example.org
traceroute -p 443 example.org

all end up on 111.111.111.111, which is OK for the first 2 requests, but not for the rest.

I did try to find examples for A and SRV entries together, but I didn't found any, just separate examples. I also didn't find statements that you can't use both at the same time.

Did I do something wrong?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Becky754

1 Comments

Sorted by latest first Latest Oldest Best

 

@Heady270

SRV records cannot be used with websites. Browsers don't know how to look up SRV records to fetch a website on a different port from a different IP address from the main DNS A record.

The reason for this is provided by Teddy in Why do browsers not use SRV records?


The RFC for SRV records specifies that it may not be used by pre-existing protocols which did not already specify the use of SRV records in their specifications. I.e. no SRV in the HTTP spec - browsers are, by the SRV standard, prohibited from using it.

This does not prohibit a new HTTP 1.2 standard from specifying the use of SRV records, though. However, Mark Andrews proposed this in April 2007 to the IETF HTTP working group, but got no response.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme