Announcement

Collapse
No announcement yet.

Migrate Server

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Migrate Server

    Hi all, hi John

    we have a server with a bad IP (i.e. bad reputation of the whole subnet, our server is squeaky clean), so some mails are blocked and we can do nothing about.

    Now I am thinking about moving the whole server to another IP. The process itself is quite easy, as the server is virtual and I can simply stop it and restart it somewhere else. I have done this in the past with an "empty" server, i.e. no Siteworx accounts. So I know all the steps to change the IP resp. MAC address in all the necessary places an so on.

    But I have never attempted this with a full server. The procedure shouldn't be different except for the fact that the external system IP suddenly is different. And here I am uncertain how to best do this resp. what happens if I edit all the config files and start the server. The beauty is, all our virtual servers use the same internal IP, so only the MAC would change and the external IP.

    And I have to edit all DNS entries for that server. I SHOULD have used {ipv4} everywhere, but can't rule out that I entered it manually somewhere, so I'd have to search-replace it via SQL.
    What would happen to DNS Sync? Should I take the moving server out of the sync, move it, change the DNS entries and then sync it to the others again? Or do the Search-Replace on all name servers?

    Has anyone ever done this? Any caveats or things I didn't think of?

    Thanks for any input
    Michael

  • #2
    Hi Micheal

    I hope your well

    Iím just out at moment but if you look at pex files from ~iWorx/bin, there is one called ip something (sorry,canít remember itís full name and this changes all siteworx dns etc ipaddresses

    You could leave old ip in place for NS, or change them if you have time, but please do not forget to change outgoing mail IP address.

    In fact, for quickness, you could just change the outgoing ipv4 address used by mail server or relay it through another until you clean the bad IP address

    I should be back tommorow so will catch up then if alright

    Many thanks

    John

    Comment


    • #3
      Hi John,

      yes, I'm fine. You too, I hope.

      Relaying the outgoing mail through another might be a good idea, even temporary. I will have to read up on how to do that.

      Bu I will still work out how to completely migrate a full server, 'cause even if I can clean that IP, I will have to migrate some machines to a newer cloud infrastructure. So any pointers are still very welcome.

      Have a great day.

      Michael

      Comment


      • #4
        Hi Michael

        Many thanks

        To mass change an IP address to a different IP address, you need to SSH into server, then either run as root or su ./migrate-ip.pex

        this will ask you for old IP and then new IP and confirm action

        This should then change siteworx/nodeworx/qmail sender IP for siteworx etc... but it has been a while since I used migrate.

        You may need to also change server hostname vi /etc/hosts and make sure new IP is shown, if not change to correct IP

        If you just want to relay mail, it is from nodeworx/services/mail/MTA/relay - but please make sure you whitelist relay IP on the relaying server

        You could also just add a new IP to this server, and set qmail to use new IP as Paul shown


        To set a default outgoing ip for all mail, add the following to a /var/qmail/control/bindroutes file:

        :ip.ad.dr.es

        To set the outgoing ip for a given domain only, add the following to a /var/qmail/control/senderip file:

        domain.com:ip.ad.dr.es

        https://forums.interworx.com/forum/n...ess-selection=

        or have a read here

        https://forums.interworx.com/forum/c...nge-manage-ips

        Sorry, do you mind me asking if the IP in question is 5.9.nnn.nnn (sorry, I could not resist just checking IP I know you may use).

        If so, the only issue is RDNS is not set, which no RDNS would cause issues sending email. I did not see any blacklisted IP on the IP that I know you may use.

        I hope that helps a little

        Many thanks

        John

        Comment


        • #5
          Hi John,

          great, will test the migrate-ip.pex on a copy and see what it does.

          I can't add any IPs to that server, so I will go down the relay route to solve the issue temporarily, until I either migrate or the IP is clean. Our data centre has a blacklist manager who is looking into it with Talos - who are the only ones assigning that IP a bad reputation. Sadly most Cisco admins are to lazy or simply have no idea how to configure additional blacklists to avoid false positives and blindly block everything. If I ever have enough of being self employed, I 'd get a job as an admin in a company - bossing around other employees and getting by with just a few hours of appearing productive... :D

          And the IP is in the 94.130.nnn.nnn and the one you looked is not used for sending mails, but another Ip on that same server with correct PTR ;-)

          Comment


          • #6
            P.S, I don't see any relay option in the MTA settings?!? There's only the SMTP route (i.e. qmail bindroutes), but that's not what you meant, or is it?

            Comment


            • #7
              Hi Michael

              Haha please save the admin job for me :) I never seem to find those jobs

              Yes, sorry that is exactly the relay area. You add domain or server wide for all domains. Please remember this is not the domains on the server, but domains they send to, which is then relayed through whichever you specify

              Hope that helps and have a lovely bank holiday if you have one.

              Many thanks

              John

              Comment

              Working...
              X