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
http://example.org
http://www.exampleuorg
https://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 www.example.org
traceroute -p 80 example.org
traceroute -p 80 www.example.org
traceroute -p 443 example.org
traceroute -p 443 www.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?