Operating System - HP-UX
1834942 Members
2193 Online
110071 Solutions
New Discussion

Changing server's IP/NAME

 
Alex Lavrov.
Honored Contributor

Changing server's IP/NAME

Hello,

yeterday I changed IP and NAME of two of my servers. Just switched them and booted the servers. Everything looked fine, but now services like ftp, remsh and rexec do not work between these two servers. Outside and from outside I can ftp and rexec the servers it just does not work from each other.

Any ideas what can cause this strange problem?

thanx in advance.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
20 REPLIES 20
Robert-Jan Goossens
Honored Contributor

Re: Changing server's IP/NAME

HI Alex,

check the nslookup results between the two servers.

# nslookup server1
# nslookup server2
# nslookup ip_server1
# nslookup ip_server2

Repeat it on the other server.

Also check the /etc/rc.config/netconf file and the /etc/hosts file.

Regards,
Robert-Jan
Alex Lavrov.
Honored Contributor

Re: Changing server's IP/NAME

Hello,

I already checked it couple of times, everything is fine. They resolve each other fine and can ping and even telnet each other.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
Sunil Sharma_1
Honored Contributor

Re: Changing server's IP/NAME

This is name resolution problem. check if new name is grtting resolved through nslookup. If you are using DNS for name resolution then update DNS server with new name and IP address and if you are using local files then updat /etc/hosts file with new hostname and IP address.

Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
Robert-Jan Goossens
Honored Contributor

Re: Changing server's IP/NAME

Alex,

What kind of error message do you get ?

remsh and rexec do not work --> .rhosts file ?

Robert-Jan
Robert-Jan Goossens
Honored Contributor

Re: Changing server's IP/NAME

How about the /var/adm/inetd.sec file, did you secure your systems ?

Regards,
Robert-Jan
Alex Lavrov.
Honored Contributor

Re: Changing server's IP/NAME

No, it's not resolvin problem, I thought so too, but all the resolvings are ok.

When I'm trying to ftp I get this error (after I enter user and password):
421 Service not available, remote server has closed connection
Login failed
No control connection for command: Error 0

rexec just exits with no message.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
bhavin asokan
Honored Contributor

Re: Changing server's IP/NAME

hi,

see the following files and make necessary change (according to your new ips)

.netrc , .rhosts files in your home directories.and hosts.equiv file in /etc folder.

.netrc is used for ftp & rexec without login name & passwd.see man netrc for details.

other files are used for rcp,rmesh ,etc .see man page of rhosts.

regds,
Alex Lavrov.
Honored Contributor

Re: Changing server's IP/NAME

We don't use .netrc and hosts.equiv files.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
Robert-Jan Goossens
Honored Contributor

Re: Changing server's IP/NAME

Hi Alex,

Are you sure it not a security setting in the /var/adm/inetd.sec ?

Regards,
Robert-Jan
bhavin asokan
Honored Contributor

Re: Changing server's IP/NAME

hi,

see the following link,

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=270687

and make it sure that you have changed the routing entries also after changing the ip.

regds,

Alex Lavrov.
Honored Contributor

Re: Changing server's IP/NAME

cheked there, nothing about ftp.

the strange thing is that it's not working only between these two servers ....

I think there is still some place that has the old IP or name and it messes the things up, but I failed to find it.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
Robert-Jan Goossens
Honored Contributor

Re: Changing server's IP/NAME

Start a find.

# find / -type f -exec grep "xxx.x.x.xxx" {} \; | more

Robert-Jan
Alex Lavrov.
Honored Contributor

Re: Changing server's IP/NAME

Yep, I did it in /etc directory, but did not find any old IP ... I'll try it later at the evening so it will not get the server's disks too busy.

Thanx.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
Alex Lavrov.
Honored Contributor

Re: Changing server's IP/NAME

I tried to use tcpdump, saw some packets and for some reason now it works only for one server. Now one of them can ftp the other ....
Have no idea why it happened ....
But 50% of the problem solved :-)

P.S. sorry, I forgot to assign points, I fixed it. thanx.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
Jan Sladky
Trusted Contributor

Re: Changing server's IP/NAME

Hi Alex,

only idea, wern't the new IPs previously used ?

What is in syslog on server after unsuccessful ftp ?

rgds Jan
GSM, Intelligent Networks, UNIX
Alex Lavrov.
Honored Contributor

Re: Changing server's IP/NAME

I swtiched their IP ...

Absolutely nothing in syslog about ftp ....
I don't give a damn for a man that can only spell a word one way. (M. Twain)
Jan Sladky
Trusted Contributor

Re: Changing server's IP/NAME

next ideas,

are you trying ftp via ip or hostname ?
What is the result if you try ftp via ip ?

rgds Jan
GSM, Intelligent Networks, UNIX
Alex Lavrov.
Honored Contributor

Re: Changing server's IP/NAME

Tried both of them, same error.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
Mohanasundaram_1
Honored Contributor

Re: Changing server's IP/NAME

Hi Alex,

CHeck if you have a file called ftpusers under /etc/ftpd. if so, the user names mentioned in this file cannot perform ftp.

check man ftpusers for more details. Hope this helps.

With regards,
Mohan.
Attitude, Not aptitude, determines your altitude
bhavin asokan
Honored Contributor

Re: Changing server's IP/NAME

hi,

Mohanasundaram,if an entry is there in /etc/ftpd/ftpusers after giving the username it will refuse the connection,it will not ask for passwd.

regds,