How to redirect DNS to different ports

后端 未结 4 2002
耶瑟儿~
耶瑟儿~ 2020-12-12 11:47

TL;DR:

DNS resolution of a domain(s) must map to IP:port(s), instead of just IP.

Example,

sub1.example.

4条回答
  •  情话喂你
    2020-12-12 12:23

    Since I had troubles understanding this post here is a simple explanation for people like me. It is useful if:

    • You DO NOT need Load Balacing.
    • You DO NOT want to use nginx to do port forwarding.
    • You DO want to do PORT FORWARDING according to specific subdomains using SRV record.

    Then here is what you need to do:

    SRV records:

    _minecraft._tcp.1.12          IN SRV    1 100 25567 1.12..
    _minecraft._tcp.1.13          IN SRV    1 100 25566 1.13..
    

    (I did not need a srv record for 1.14 since my 1.14 minecraft server was already on the 25565 port which is the default port of minecraft.)

    And the A records:

    1.12                          IN A      
    1.13                          IN A      
    1.14                          IN A      
    

提交回复
热议问题