changing server ip

rseshan

Verified User
Joined
Sep 8, 2005
Messages
10
hi guys i am having a pretty serious problem.

6 months after we started hosting a server we reliased that the ip address assigned to us has been blacklisted by SORBS.

they are refusing to remove it even though the violation happend when the ip address was assigned to someone else.

now off the 5 email address range 245 to 249 i am running 245 as server and the other four as nameservers.

now 245 is blocked but others are not. so i would like to change the ipaddress assigned to server so say 246 and move the ns2 from 247 to 246. i know how to move the ns but any idea how to change the server ip?

thanks in advance

rgds

ram
 
Not quite that simple. At least not from my admittedly quick read of the script.

Since your server sends email through the main IP# of the server, you have to change your network configuration so a different IP# is the main server IP# (which will require changing the DA license as well).

ipswap.sh doesn't appear to actually change your network configuration; only your DA configuration.

Jeff
 
the problem was solved by directadmin support i am pasing the solution for people who ever need to do this.

Hello,

There are a couple ways of doing it.. the easiest might be to leave the server IP as it is, and just get exim sending out from a different IP, and change the MX records for all domains.

1) /etc/exim.conf

add:

interface = 1.2.3.246
in the remote dns section

remote_smtp:
driver = smtp
<b> interface = 1.2.3.246 </b>


to the top of the file (assuming you want to use 246 now. Replace 1.2.3 with the correct rnumbers).
Restart exim.

2) Fix dns:

cd /var/named
perl -pi -e 's/246/245/' *.db
this doesnot work so i changed each mx manually.

restart named.

3) fix template for new domains:
cd /usr/local/directadmin/data/templates
cp dns_a.conf custom
cd custom
#edit the copied dns_a.conf, replace "mail=|IP|" with "mail=1.2.3.246"

4) same thing for the spf record
cd /usr/local/directadmin/data/templates
cp named.db custom
cd custom
#edit named.db. replace:

|DOMAIN|. IN TXT "v=spf1 a mx ip4:|SERVER_IP| ?all"

with

|DOMAIN|. IN TXT "v=spf1 a mx ip4:1.2.3.246 ?all"



Thank you,

John
--------------------------------------------------

DirectAdmin Web Control Panel
http://www.directadmin.com



thanks john
rgds

ram
 
ram,

I think there's a typo in your quote of John's changes:
remote_smtp:
driver = smtp
<b> interface = 1.2.3.246 </b>
My guess is that exim.conf really doesn't want those bracketed <b> and </b> entries but that you though that would show up as bold to indicate the change.

Jeff
 
Back
Top