Changing multiple user IP's

G7Cloud

Registered
Mar 8, 2021
1
0
1
London, UK
cPanel Access Level
DataCenter Provider
Hi,

I know in WHM theirs a 'Change Multiple Sites’ IP Addresses' however this is too slow when trying to change hundreds of users IP addresses. Does anyone know how to do this via command line? I just need a simple SSH command to change IP for X user to X IP.
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
15,185
2,413
363
cPanel Access Level
Root Administrator
Hey there! It sounds like you'll want to use this API call, with the username example, to ensure the entire account changes:


An example would look like this:

Code:
# whmapi1 setsiteip user=cptest ip='192.168.4.10'
---
metadata:
  command: setsiteip
  reason: OK
  result: 1
  version: 1
Let me know if that helps!