cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
502
Views
5
Helpful
2
Replies

NAT and FTP

mbstrauss
Level 1
Level 1

First, apologies for posting this in 2 forums, but I wasn't sure whcih one to go with.. I'm running a 2651XM router with CBAC and nat enabled on the outside interface.

Can anybody shed some light on the best way to do this.. I have a server on our inside network 1.1.1.1 that needs to ftp to two ftp servers on our outside network - 2.2.2.2 and 3.3.3.3. Further, server 3.3.3.3 (outside) is required to access the ftp server on 1.1.1.1 (inside) .

Ordinarily this would not be a problem, however, when connecting to the outside host 2.2.2.2 the ftp client (1.1.1.1 ) must use the source IP 4.4.4.4. Also, when connecting to the other outside host, 3.3.3.3, the ftp client (1.1.1.1 ) must use the source ip of 5.5.5.5... Finally, this ip ( 5.5.5.5 ) is also the destination ip that 3.3.3.3 must use when making its inside connection to 1.1.1.1's ftp server.

I have tried every combination of static nat and dynamic nats with acl's and route maps, but I'm not having much luck. I would the best scenario is to have a simple static nat for 1.1.1.1 to connections to and from 3.3.3.3. However, if I add a dynamic nat for 1.1.1.1 to 2.2.2.2, my ftp client always picks up the ip used to connect to the other server.

I can post sample configs if you want, but I'd rather not lead people astray with my own "interpretation" of the rules required... I'd be interested to see what others have to say.

Cheers

M

2 Replies 2

shijogeorge
Level 1
Level 1

Hi,

Try static NAT statements with route mapping as follows.

ip nat inside source static 1.1.1.1 4.4.4.4 route-map ftp1

ip nat inside source static 1.1.1.1 5.5.5.5 route-map ftp2

access-list 101 permit ip host 1.1.1.1 host 2.2.2.2

access-list 102 permit ip host 1.1.1.1 host 3.3.3.3

route-map ftp1 permit 10

match ip address 101

route-map ftp2 permit 10

match ip address 102

HTH

Regards,

Shijo George.

Fantastic stuff - thanks for your help

I had previously used statics - but without route maps they wouldn't do what I want.. And of course a dynamic nat would not allow the inbound.

thanks again

M