Migrate Server

Hi all, hi John :tongue:

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

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

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

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

http://forums.interworx.com/forum/nodeworx/general-discussion-aa/3121-patching-qmail-outgoing-ip-address-selection?3018-Patching-qmail-outgoing-ip-address-selection=

or have a read here

http://forums.interworx.com/forum/customization/hacks-tools-tips-tricks/4123-mass-change-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

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… :smiley:

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 :wink:

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?

Hi Michael

Haha please save the admin job for me :slight_smile: 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

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.distance between 2 cities

i agree

Hi Gabor

If only your Mac changes and you have no rules to give Mac an IP address then nothing will change

If you do have rules for Mac ip addresses then you would need to change them

Migrate-ip.pex is the solution for moving servers as it changes all ip addresses to the correct IP address you would use

You would still have to change host file I think

Many thanks

John

great how kind