How to remove an Additional IP or make ik primary

japz

Verified User
Joined
Jul 21, 2010
Messages
11
Hi all,

I needed to change all IP's because I received a new block of IP's.

Everything went ok, except for one user. This user has now 2 IP's, 1 IP is additional (2.2.2.2) and this additional IP should be the only IP for this user. Instead of the other primary IP (1.1.1.1).

When I try to set the additional 2.2.2.2 as primary (default) IP by Modifying the User and Select 2.2.2.2 I get this message: 'That IP is already in your list of Additional IPs'

I'm stuck now, I have no idea how to remove the additional IP 2.2.2.2 first so I can change the current main ip 1.1.1.1 to 2.2.2.2.

The additional IP 2.2.2.2 is a Shared Server IP.

Thanks in advance
 
Hello,

What if you remove the ip from this file

/usr/local/directadmin/data/users/<username>/user_ip.list

and use this

Code:
# /usr/local/directadmin/scripts/ipswap.sh
Usage:
/usr/local/directadmin/scripts/ipswap.sh <oldip> <newip> [<file>]

to update the configs.
 
Thanks a lot! The ipswap was not even needed.

After the first step I removed the additional IP and then withing DA I could finally replace the IP so now the additional IP is the only ip!
 
The ipswap script will still make certain that there are no references to the deleted IP# inside the system, and since it's basically a search and replace, it shouldn't do any harm.

(Note the above representation is NOT a guarantee; I only guarantee the work I do myself under contract.)

Jeff
 
Back
Top