cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2105
Views
0
Helpful
5
Replies

Port-based routing

thegrave2000
Level 1
Level 1

I have the following problem: I need to forward all smtp traffic to a specific interface/ip (both interfaces are with public IPs) but in the cmd for creating a static route there's no option to specify a port number. Any idea how to do it? I know how to do it with ip tables but not on a CISCO router. Sorry for the stupid question and thank you in advance

5 Replies 5

nsteup
Level 1
Level 1

You have to build an access-list like following:

access-list 100 permit tcp any host xx.xx.xx.xx eq 25

Then use this access-li in a route-map:

route-map mails permit 10

match ip address 100

set ip next hop xx.xx.xx.xx

Now bind this route-map to your inside interface

Hope this helps

Norbert

Thank you very much, I'll tell you the result as soon as I test it!

OK, another stupid question: How do I bind a route-map to an interface, I looked for a cmd but I didn't find anything. Or you mean to bind the access-list?

xxx(config-if)# ip policy route-map yyyyy

Yeah, after reading a couple of documents I made the same conclusion. Thank you for the help once again!