cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
442
Views
0
Helpful
2
Replies

Port forwarding on Router

Anand Narayana
Level 6
Level 6

Hi,

my requirement as follows,

Internet Rotuer - 1.1.1.1(s0)

2.2.2.1(f0/0)

FTP server(21) - 2.2.2.2

Webserver(80) - 2.2.2.3

POP(110) - 2.2.2.4

SMTP(25) - 2.2.2.5,

in this scenario, all the servers has got private ip addresses residing in LAN. now from the internet, if i am trying ftp to 1.1.1.1, the router should automatically do a port forwarding to 2.2.2.2 which is residing on LAN same for other servers http://1.1.1.1 it should forward to 2.2.2.3 on my LAN web server.

currently i have been doing the same with my OpenBSD for the past 2 yearz, workz fine, but iam curious to know the configuuration on the router.

2 Replies 2

froggy3132000
Level 3
Level 3

You need to configure PAT.

ip nat inside source static tcp 2.2.2.2 21 interface s0 21

d-mark
Level 1
Level 1

Hi,

maybe this config would meet your requirements:

interface serial0/0

ip addresse 1.1.1.1 255.255.255.252

ip nat outside

!

interface fastethernet0/0

ip address 2.2.2.1 255.255.255.0

ip nat inside

!

ip nat inside source list 123 interface serial0/0 overload

ip nat inside source static tcp 2.2.2.2 21 1.1.1.1 21

ip nat inside source static tcp 2.2.2.3 80 1.1.1.1 80

ip nat inside source static tcp 2.2.2.4 110 1.1.1.1 110

ip nat inside source static tcp 2.2.2.5 25 1.1.1.1 25

!

access-list 123 permit ip any any

!

end

I'm not sure if this works for ftp, maybe only active or passiv ftp will work.

HTH

Mark