Operating System - HP-UX
1833187 Members
2635 Online
110051 Solutions
New Discussion

FTP FROM VIRTUAL IP ADDRESS

 
SOLVED
Go to solution
Luk Vandenbussche
Honored Contributor

FTP FROM VIRTUAL IP ADDRESS

Hi,

I log on to my server on the package IP adres, works fine.
When I start an ftp from this session to another server it see an incoming FTP from my 'real' IP address and not the virtual.

How can I solve this that the incoming FTP connection comes from the virtual ip address
9 REPLIES 9
Stephen Doud
Honored Contributor
Solution

Re: FTP FROM VIRTUAL IP ADDRESS

'ftp' binds to the fixed IP of the NIC used to connect to the target system.
In order for 'ftp' to bind to a non-fixed (relocatable) IP, the ftp binary must be coded to permit it, which is currently not the case.
See this section of the Managing Serviceguard manual: http://docs.hp.com/en/B3936-90095/B3936-90095.pdf --- PAGE 421
Luk Vandenbussche
Honored Contributor

Re: FTP FROM VIRTUAL IP ADDRESS

Thx,

I anybody know another workaround to solve my problem?
Greg Vaidman
Respected Contributor

Re: FTP FROM VIRTUAL IP ADDRESS

What is the actual problem you're trying to solve (*WHY* do you need it to bind to the virtual IP?)?

One thing to try would be to set up a static route to your FTP server that uses the VIP as the gateway, but I'm not sure this will actually work - it's possible that the server will see the client coming in from the physical interface anyway...
Steven E. Protter
Exalted Contributor

Re: FTP FROM VIRTUAL IP ADDRESS

Shalom Luk,

I would suggest to accomplish the goal, you set up a server instead of the virutalip address and do the ftp transaction from there.

You could also do a quick ifconfig switch and make the vitural ip address primary, do the transfer and then switch it back. Bad idea, but if its really important and you don't mind disrupting networking you can do this.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Luk Vandenbussche
Honored Contributor

Re: FTP FROM VIRTUAL IP ADDRESS

SEP,

The problem is that we need a virtual IP adres instead of a failover to the other server. How would you switch the IP's.

Fixed ip : 10.1.0.30
Virtual : 10.1.0.154
Wayne Patton_1
Advisor

Re: FTP FROM VIRTUAL IP ADDRESS

I have solved this before. Just so I understand. You are initiating a FTP session from a cluster node running the package. You want the target to think the FTP session is coming from the "package" IP instead of the permenant IP on the node. Correct?

What we did to work around this was to add a route specific to the target system.

/usr/sbin/route add host target-ip gateway-ip

The target is the system you want to connect to, the gateway would be your package IP. This made it appear to the target system that the connection came from the package IP and not the permenant IP.

wayne
Wayne Patton_1
Advisor

Re: FTP FROM VIRTUAL IP ADDRESS

One more note . . .to make the change work all the time, you will have to add code to the package control script, that adds the route when the package starts, and deletes the route when the package stops.

-wayne
Luk Vandenbussche
Honored Contributor

Re: FTP FROM VIRTUAL IP ADDRESS

Wayne,

Looks good on my first opnion.
I will invest it in detail to see if it is a good solution

Keep you in touch
Luk Vandenbussche
Honored Contributor

Re: FTP FROM VIRTUAL IP ADDRESS

Wayne gave the solution