Sunday, January 14. 2007Migration to virtual server accomplished![]() I successfully switched my hosting from my real-hardware machine ‘daemon’ to my new virtual-hardware machine ‘gauss’ which is hosted by HostEurope.de. After turning off the services on ‘daemon’ and doing a final sync, I started the services on ‘gauss’ and activated the TCP-forwarding on ‘daemon’ with rinetd. I forwarded FTP, HTTP(S) and IMAP(S) such that users could connect to the old IP where those connections got forwarded to the new IP. With this, the new host only saw connections originating from the old IP although they actually belonged to strangers. Therefore I didn’t also forward the SMTP-port directly, because in that case the realtime blacklisting would have failed. So I configured Postfix to keep doing RBL lookups and SPAM and virus scanning, and to forward mails destined for the local domains to the new host. I did it this way: In /etc/postfix/main.cf, I first deactivated mydomain and replaced it by myhostname in the definition of mydestination. Then I added the lines CODE: relay_domains = <i>domain1</i>, <i>domain2</i>, <i>domain3</i>
transport_maps = hash:/etc/postfix/transport
append_at_myorigin = no and simply deactivated the virtual_maps. By this, I couldn’t reject unknown users anymore, but that was easier as I didn’t want to think what aliases I had. The new host could tell anyway what users did exist. However, it could’ve been done by setting CODE: relay_recipient_maps = hash:/etc/postfix/relay_recipients and adding lines to the mentioned file like CODE: <i>user1@domain1</i> x
<i>user2@domain1</i> x
... which then had to be postmap’ed. After that I created entries in /etc/postfix/transport like CODE: <i>domain1</i> smtp:[<i>IP.ADD.RE.SS</i>]
<i>domain2</i> smtp:[<i>IP.ADD.RE.SS</i>]
<i>domain3</i> smtp:[<i>IP.ADD.RE.SS</i>] what also had to be postmap’ed, of course. (Probably the syntax relay:[IP.ADD.RE.SS] works as well.) To test Postfix with these settings before the actual migration, I wanted it to listen on another TCP-port temporarily, say, 2525. I had to add that port as allowed mailing port to /etc/services, say, as CODE: smtptest 2525/tcp mail after what I replaced smtp by smtptest in /etc/postfix/master.cf in the line starting with smtp and ending with smtpd. Now I could check via Telnet to port 2525 and talking plain SMTP that I didn’t provide an open relay and that all mails went where they should go to. I had to keep the relayhost active on ‘daemon’ for possible locally originating mails or SMTP AUTH. After activating rinetd on ‘daemon’ and checking that everything worked as it should, I told my provider to switch the IPs in the DNS. Shortly after those changes were active, most of the clients were already brought to the new IP directly. 12 hours later only few connections were still coming to the old IP, most of them by crawlers. Surprisingly, this is still the case 24 hours later. The last connections came 42 hours later from some weird scanners located in Columbia, South Korea or China, and 9 hours after the last visit I turned off rinetd. ‘daemon’ is now absolved its responsibility and will play a different and yet unknown role in my network, maybe as a backup host. The changes in the basic data of the servers are: space 20GB→15GB, CPU single@800MHz→dual@700MHz (according to /proc/cpuinfo), RAM 384MB→3GB(!), swap 1GB→8GB(!).
Posted by Stephan Paukner
in GNU/Linux
at
11:11
| Comments (0)
| Trackbacks (3)
Defined tags for this entry: postfix
|
AboutCalendar
ArchivesCategoriesShow tagged entriesandroid antenna anti-spam apache astronomy austria automobile ballooning bash bluetooth bug career cloud collecting comic cooking cw debian dreams education electronics event fail fashion finance flickr fuerteventura fun gentoo geography german gnu-linux gnucash google google earth graphics guitar hardware history image processing internet kernel kids language lanzarote lhc lifestyle linkroll literature ltd machine learning making mallorca mathematics matlab microsoft migration movies music numismatics octave pdf perl philately philosophy phone photo gear photography physics podcast politics postfix private programming public transport rant religion review samsung science security shtf social web software statistics storage sustainability symbian tablet time lapse transceiver tv usenet video virtualization wordplay work www yahoo youtube
Syndicate This BlogFollow meBookmarks
Powered by |
Logbook of Stephan Paukner on : Debian lenny, Kernel 2.6.9 and libc6 2.7
Stephan Paukner » syslog on : Server migrated from virtual to virtual
Stephan Paukner :: syslog on : Server migrated from virtual to virtual, II