Change IP Address

Jason
Beiträge: 4
Registriert: 21 Apr 2011, 02:26

Change IP Address

Beitragvon Jason » 26 Apr 2011, 01:20

What do I need to do if I change the IP address of the server? I am using your Ubuntu VM image. I initially did the 1stboot setup with 192.168.1.1 and now I want to change it to 10.0.0.1. If I just change the IP address on the command line, I am unable to connect when setting up the client agent. Samba works but I can't get past the DialogServicePassword window during the install. I noticed it was pre-populated with "https://192.168.1.1:4447" so the old IP address appears to be in a configuration file somewhere. Do I need to run 1stboot again or do something else?

Antoine GUEVARA
Beiträge: 54
Registriert: 13 Apr 2011, 22:01
Wohnort: GIP RECIA - France

Re: Change IP Address

Beitragvon Antoine GUEVARA » 26 Apr 2011, 09:50

Hi,

Try :

Code: Alles auswählen

opsi-admin -d method setGeneralConfigValue clientconfig.configserver.url "https://10.X.X.X:4447/rpc"


This will change your Depot IP in your configuration

Check your /etc/hosts

And if your client can't dialog with the opsi depot, check your configuration file ( C:\Program Files\opsi.org\opsiclientd\opsiclientd.conf ) you have an [config_service] section with an URL parameter, change your IP addresse into the URL parameter.
Restart the opsiclientd windows service ( services.msc )


Now you have your good configuration change the value of your configuration file for the opsi-client-agent ( /opt/pcbin/install/opsi-client-agent/files/opsi/cfg/config.ini )
config_service.url = https://IP:4447

Jason
Beiträge: 4
Registriert: 21 Apr 2011, 02:26

Re: Change IP Address

Beitragvon Jason » 26 Apr 2011, 19:01

Thanks. I got it to work with your help. It didn't work at first though. I'm not sure what made it work but in addition to what you suggested, I found that the network was not updated in /var/lib/opsi/config/depots/opsidemo.uib.local.ini. I assume there is an opsi-admin command that you're supposed to use but I'm not that familiar with it yet. I changed the network and mask in that file and restarted everything with:

Code: Alles auswählen

opsi-setup --init-current-config
opsi-setup --set-rights
/etc/init.d/opsiconfd restart
/etc/init.d/opsipxeconfd restart

vincent.rousseau
Beiträge: 2
Registriert: 13 Okt 2017, 14:21

Re: Change IP Address

Beitragvon vincent.rousseau » 18 Okt 2017, 17:09

New path to config.ini :
/var/lib/opsi/depot/opsi-client-agent/files/opsi/cfg

cgiesers
Beiträge: 29
Registriert: 22 Feb 2017, 02:11

Re: Change IP Address

Beitragvon cgiesers » 23 Feb 2019, 01:04

As I stumbled over that, too...

I needed to remove:
/var/lib/opsi/config/clients/clientname.ini - as the re-install always set the wrong (old) IP.
...you could also fix the old IP inside, but I prefered to "clean" the test machine and so remove the ini, too.

Also commands for most distros are now:
systemctl restart opsiconfd.service
systemctl restart opsipxeconfd.service

Regards
- Christof

Edit:
You probably also need to change
[depotshare]
remoteurl = smb://192.168.x.y/opsi_depot
webdavurl = webdavs://192.168.x.y:4447/depot

[repository]
remoteurl = webdavs://192.168.x.y:4447/repository

[workbench]
remoteurl = smb://192.168.x.y/opsi_workbench


...is there something that could change it all at once?

guillaume
Beiträge: 19
Registriert: 19 Feb 2019, 18:08

Re: Change IP Address

Beitragvon guillaume » 15 Dez 2019, 18:46

cgiesers hat geschrieben:
Edit:
You probably also need to change
[depotshare]
remoteurl = smb://192.168.x.y/opsi_depot
webdavurl = webdavs://192.168.x.y:4447/depot

[repository]
remoteurl = webdavs://192.168.x.y:4447/repository

[workbench]
remoteurl = smb://192.168.x.y/opsi_workbench


...is there something that could change it all at once?


Hello,

I am in the same process, and i was wondering if you remember in which file you change this ?
Do you make change on opsiclientd.conf of all your computers ? I didn't find anything like this.

Thanks a lot,
Guillaume

cgiesers
Beiträge: 29
Registriert: 22 Feb 2017, 02:11

Re: Change IP Address

Beitragvon cgiesers » 15 Dez 2019, 20:32

I can't remember and since it was during test-phase, I didn't touch any clients, as I only had some test machines, which I reinstalled a bunch of times.

Otherwise, yes: There's a URL-Parameter, that probably has to be changed on every client.