Operating System - HP-UX
1836818 Members
1549 Online
110110 Solutions
New Discussion

Re: Can I ftp with a specified interface?

 
SOLVED
Go to solution
MA Qiang
Regular Advisor

Can I ftp with a specified interface?

In my box, I have 2 interfaces for MC packages: lan1:1(10.10.20.40), and lan1:2(10.10.20.41). The ftp server only allowed incoming IP 10.10.20.41. Can I connect to the ftp server with specified IP 10.20.20.41?

Thanks.
8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: Can I ftp with a specified interface?

Yes.

If you have a floating ip its best to use that for external ftp transactions. This way ftp transactions,scripts, users don't care what the state of the cluster is.

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
MA Qiang
Regular Advisor

Re: Can I ftp with a specified interface?

Sorry for the ambiguity of my question.
My box with IP 10.10.20.40 and 10.10.20.41 is the CLIENT. I want to access the ftp server which only allows the IP 10.10.20.41.

Thanks.
Muthukumar_5
Honored Contributor

Re: Can I ftp with a specified interface?

Connectivity or Sending pockets are based on routing setting? what is the ip-address of ftp server.

# traceroute

which ip-address it's using to take to reach ftp-server?

You have to set routing to ftp server accordingly.

To know routing then,

# netstat -rvn

-Muthu
Easy to suggest when don't know about the problem!
MA Qiang
Regular Advisor

Re: Can I ftp with a specified interface?

I am not familiar with routing.
Would you please tell me how to 'set routing to ftp server' when I access the ftp server?

Thanks.
Muthukumar_5
Honored Contributor

Re: Can I ftp with a specified interface?

Can you post your routing setting information as,

# netstat -rn

what is the ftp server IP-Address?

Post this two information so that you can change referring routing setting to your FTP client machine.

-Muthu
Easy to suggest when don't know about the problem!
MA Qiang
Regular Advisor

Re: Can I ftp with a specified interface?

ftp server is 10.10.33.89

# traceroute 10.10.33.89
traceroute: Warning: Multiple interfaces found; using 10.20.20.40 @ lan1:1
traceroute to 10.10.33.89 (10.10.33.89), 30 hops max, 40 byte packets
1 10.20.20.1 (10.20.20.1) 0.395 ms 0.237 ms 0.231 ms
2 10.20.2.14 (10.20.2.14) 0.363 ms 0.237 ms 0.233 ms
3 10.10.30.139 (10.10.30.139) 0.240 ms 0.217 ms 0.225 ms
4 10.10.33.89 (10.10.33.89) 0.347 ms 0.216 ms 0.203 ms


# netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
10.20.20.19 10.20.20.19 UH 0 lan1 4136
10.20.20.40 10.20.20.40 UH 0 lan1:1 4136
10.20.20.41 10.20.20.41 UH 0 lan1:2 4136
192.168.0.2 192.168.0.2 UH 0 lan0 4136
10.20.20.0 10.20.20.19 U 4 lan1 1500
10.20.20.0 10.20.20.41 U 4 lan1:2 1500
10.20.20.0 10.20.20.40 U 4 lan1:1 1500
192.168.0.0 192.168.0.2 U 2 lan0 1500
127.0.0.0 127.0.0.1 U 0 lo0 0
default 10.20.20.1 UG 0 lan1 0

Arunvijai_4
Honored Contributor

Re: Can I ftp with a specified interface?

Do you want FTP access from 10.10.20.41 (client) to 10.10.33.89 (Server) ?

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Muthukumar_5
Honored Contributor
Solution

Re: Can I ftp with a specified interface?

10.20.20.19 10.20.20.19 UH 0 lan1 4136
10.20.20.40 10.20.20.40 UH 0 lan1:1 4136
10.20.20.41 10.20.20.41 UH 0 lan1:2 4136
default 10.20.20.1 UG 0 lan1 0

===

Server 10.20.20.41 routing will be done through lan1 as Default. If you are having aliasing in an interface as lan1:1 and lan1:2 then, it will take first preceding interface.

Just do as,

# route add host 10.10.33.89 10.20.20.41

You have to change in /etc/rc.config.d/netconf file for permanet availability.

#traceroute 10.20.20.41
will have to use 10.20.20.41 now.

-Muthu


Easy to suggest when don't know about the problem!