multiserver rebuild

Discussion in 'ISPConfig 3 Priority Support' started by chief, Nov 23, 2024.

  1. chief

    chief Member HowtoForge Supporter

    Hey,
    ## Please be aware - i was using a draytek router - vigor 2865##
    https://www.draytek.com/about/security-advisory/
    https://www.bleepingcomputer.com/ne...itical-flaws-in-over-700-000-exposed-routers/
    I have had about 7 instances of a DDOS attack where they (hacker or bot net) took contorl of my router to send off 1 ip 760millions emails, and i had 16 static ip's.., and the router was the issue, now on a shelf unplugged. each time the attack happened i isolated my physical network switch and unplugged it, isolated internal network as well. - watch out if you have one of these devices.
    ####
    I have rebuild the system using multiserver, pfsense+ on a dell poweredge 710 blade server with pro support.
    an issue i see on my setup is:-
    all servers are using a 10.0.0.0/24 IP - i have 32 static external IP's
    when adding a site to dns it shows internal server address ns1.domain -> 10.0.0.56, this then shows in dns, dnschecker.org and wont resolve obviously.
    so.. is there a way to map or change the server address in dns records to replicate my external numbers? or do i have to change pfsense firewall DMZ setup from using virtual ip and nat?
    or
    can i get ispconfig dns to use a setting for its external ip..
    or
    update
    Code:
    /etc/hosts
    for external IP's and change login account for the servers etc in phpmyadmin

    dave
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Then, you selected the wrong IP for the DNS record. In website settings, you must select * or the internal IP. In DNS records, you must choose your external IP address.
     
    mangoldwen likes this.
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig uses the IP address that you enter in the IP field of the DNS record. If you enter the external IP, it uses the external IP, if you enter the internal IP, it uses the internal IP. See my previous post where to use which IP.
     
    mangoldwen likes this.
  4. chief

    chief Member HowtoForge Supporter

    Hey Till, thanks for the reply.
    Think im missing something here.
    Section 1 of multiserver install -
    My host where i buy domain, i added 2 nameservers mapping hostname and IP to my external IP's of each nameserver.
    Section 2 states using internal numbers for panel.host..
    Then on page 5 - name server, does not say anything about changing anything to map to external IP's for dns.
     
  5. remkoh

    remkoh Active Member HowtoForge Supporter

    Internal ip's are only used for communication between your nodes.
    They probably are set (by you during install) in /etc/hosts

    Your DNS is for the public to be able to resolve anything related to your domainname.
    So when adding an A or AAAA record in your DNS in ISPC you ALWAYS enter the EXTERNAL IP where the hostname should resolve to.
    Because ofcourse the public can't do anything with your private ip's.
    There is no translation anywhere when it comes to DNS, only /etc/hosts taking priority over dns queries should you be using your domainname for node hostnames too.
     
    Last edited: Nov 24, 2024
  6. chief

    chief Member HowtoForge Supporter

    Yes, i have used 10.0.0.50 +
    That i get about the Internal vs external ip and dns resolution.
    On my previous build, the draytek used "IP routed subnet" and my servers were using external ips in the /etc/hosts on all nodes.
    My dns section all shows the 10.0.0.0 range used for each server and not the external IP.
    On this build using 10.0.0.0/24 in /etc/hosts, adding a domain to panel... and then specifically adding a dns record - it used to display the external ip used in the setup and didnt require me to type it in eg. . DNS -> Zones -> Domain.name -> Record -> IP-Address "12.12.12.12. IPV4 > ns1.domain.name"
    So no, i would have to type the External IP of each server for all records, or redo IP on each node so each server uses external IP and each nodes /etc/hosts is also using external IP's - just like "IP ROUTED SUBNET"
     
    Last edited: Nov 24, 2024
  7. chief

    chief Member HowtoForge Supporter

    I did do that.
    It added to DNS records 10.0.0.57.
    I altered the this to be the external IP of the server has the site.
    This works.. but ns2 states 10.0.0.57.
    I checked with DNS checker.org.
    When ns1 answers it is the correct IP and when ns2 answers it stated 10.0.0.57.
    I don't understand.. I follow that recipe to the letter.
    What did miss
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    This is likely perfectly fine, and you probably tested it wrong. If you test it from any system of this multiserver setup, then it should return 10.0.0.57 as it's set in all /etc/hosts files to ensure that internal traffic between the nodes is kept in the internal network. If you test the same from an external system, it will and has to return the external IP because you set the external IP in DNS.
     
  9. chief

    chief Member HowtoForge Supporter

    Lookup tlwebservices.co.uk It resolved as either 10.0.0.51 or 146.66.81.98 depending on which nameserver.
    I used DNSchecker.org and mxtoolbox.com DNS checker.

    #####updated
    Just went to the registrar where I purchased the domain. Instead my mapping my nameserver to the external IP. I used their DNS and added A records for server hostnames. This worked.
    This was different from naming my nameservers with the IP address and then adding my domain to my own DNS servers mapping to IP addresses, self replicating DNS me as the source of.
    Now I have to login to them to add new server hostnames. Eg adding a new web server.
     
    Last edited: Nov 24, 2024
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Then, likely, one of your two name servers has not picked up the IP change you made, check them individually. Check the zone with intodns.com, it will tell you if the zones are out of sync.
     
  11. remkoh

    remkoh Active Member HowtoForge Supporter

    Your DNS has nothing to do with your local lan setup.
    It doesn't matter if you have a routed subnet with external ip's on your nodes or using nat and ip's from a private range on your nodes.
    The only thing that matters is that a dns request from the internet ends on the correct node, wether it by routing or by nat.

    A and AAAA records always need to reflect an external ip, otherwise it is of no use to the one doing the dns request.
    If both dns servers respond with different values then there's something wrong with the master-slave functionality.
    For transfers and notification settings you should use the internal lan ip's.
    I do hope you didn't make your slave dns a mirror of the master dns within ISPC?
     
  12. chief

    chief Member HowtoForge Supporter

    Hey, I have cheked last few days and altered some things. Still have an issue with the following:
    domain = tlsystems.co.uk
    1. both nameservers report different SOA. not sure how to solve this.
    2. according to "intodns.com" it states the mx server is 10.0.0.52. unless it is cached.
    3. reverse mx A record - states 52.0.0.10. very odd as im not using that range..
     
  13. chief

    chief Member HowtoForge Supporter

    Hey, no i didnt replicate them.
    So i have to use the external IP's, got it. since the other day it works ok, different from previous. its all good.
    thanks for reply.
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    How did you connect the two name servers for primary/secondary replication? You said you are not use mirroring.

    Then you must have entered that IP or you are checking wrong name servers (maybe your name servers are not authoritative for that zone at all and your zone is still at the domain registry).

    I guess you mixed up the A and PTR records here.
     
  15. chief

    chief Member HowtoForge Supporter

    Under DNS -> Zones -> Domain
    I have ns record of external IP
    Zone settings tab -> Allow Zone transfers to -> i have tried both the internal IP and the external IP - what is recommended??
    Secondary DNS-Zones -> Domain -> NS2, client, their domain, NS1 external IP, allow = ns2 internal IP - again what should this be internal ip of external?
     
    Last edited: Nov 26, 2024
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    It depends on how you set this up and if one server can reach the other one by internal IP. Normally, you sue the internal one there if the second name server can reach the first one by internal IP by its name.

    You do not have to set any allow there as no other server needs to be allowed to copy from the secondary. Its the secondary that connects to the primary. But you must use the internal IP as IP of the primary DNS if your systems are connected over your internal network.

    You might want to consider contacting @Th0m from ISPConfig business support here https://www.ispconfig.org/get-support/?type=ispconfig to set this up for you for your first zone and check the server interconnections.
     
  17. remkoh

    remkoh Active Member HowtoForge Supporter

    I assume NS1 and NS2 are on the same lan.
    Then use internal ip's for zone transfers and notifications.
    All A and AAAA records within your DNS zones need to be external ip's.
     
    chief likes this.
  18. chief

    chief Member HowtoForge Supporter

    Thank Till,
    To confirm for NS1 to NS2 replication
    Zones -> Zone Settings -> Allow Zone transfers - I dont need to add anything here
    The magic is here
    Secondary DNS-Zone on NS2 - NS (IP-address)=Primary NS1, Allow = not used..
     
  19. chief

    chief Member HowtoForge Supporter

    Till,
    Does this relate to my issue?
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    No, its completely unrelated. There are no issues with zone transfers and there were no issues in the past. What is mentioned there is about server mirroring (which you don' use) which does not work with DNSSEC in genaral.
     
    chief likes this.

Share This Page