08-15-2013 01:27 AM - edited 03-11-2019 07:25 PM
Hi I need to route mail on port 25 through a Cisco ASA 5520 to 2 separate servers. I have one set up already which works fine but am introducing the second one now. The mail will be coming from "any" so I cannot tie it down by source. I have a block of 5 external ips so hoped i could do something by passing traffic coming to 1 ip to one internal server and to a second ip to the other. I have set up a NAT rule for the passage of smtp traffic from the second ip to the second mail server but cannot think what access rule I need to make to get the traffic from the second ip passing through as the external interface can only have 1 ip. I have seen lots of people running 2 servers for sending out but none seem to do it for receiving. Is this even possible?
08-15-2013 07:27 AM
Hi,
Some questions about your setup
- Jouni
08-15-2013 07:34 AM
Hi Jouni
Thanks
08-15-2013 07:52 AM
Hi,
Ok, so if you want to perform Static PAT for port TCP/25 only to enable inbound traffic from Internet then you would need configurations like these
Example source information
static (inside,outside) tcp interface 25 10.10.10.2 25 netmask 255.255.255.255
static (inside,outside) tcp 1.1.1.3 25 10.10.10.3 25 netmask 255.255.255.255
access-list OUTSIDE-IN remark Allow inbound SMTP traffic
access-list OUTSIDE-IN permit tcp any host 1.1.1.2 eq 25
access-list OUTSIDE-IN permit tcp any host 1.1.1.3 eq 25
access-group OUTSIDE-IN in interface outside
Only use "access-group" command if you dont have any ACL configured for "outside" interface. If you have an ACL then use its name in the above ACL configurations and dont add any additional "access-group" command.
The above configurations should enable external SMTP connections to these 2 public IP addresses.
Incase you need both servers outbound connections to show with the same IP addresses as in the Static PAT configurations you need additional NAT configurations. What I mean is if you want the connections initiated from the servers to the external network to show up with the same IP addresses then you will need something like this
access-list SMTP-SRV-1-POLICYPAT remark Dynamic Policy PAT for SMTP Server 1
access-list SMTP-SRV-1-POLICYPAT permit tcp host 10.10.10.2 any eq 25
access-list SMTP-SRV-2-POLICYPAT remark Dynamic Policy PAT for SMTP Server 2
access-list SMTP-SRV-2-POLICYPAT permit tcp host 10.10.10.3 any eq 25
global (outside) 100 interface
nat (inside) 100 access-list SMTP-SRV1-POLICYPAT
global (outside) 200 1.1.1.3
nat (inside) 200 access-list SMTP-SRV-2-POLICYPAT
The above ACLs defines the condition when this translations should be done. The "global" and "nat" perform the actual NAT/PAT.
I would imagine that you might not need the ID 100 rule since you probably already PAT outbound traffic to it but it might be clearer to read the configuration when both servers had their own configurations still.
Hope this helps
Please do remember to mark a reply as the correct answer if it answered your question.
Feel free to ask more if needed though.
- Jouni
08-15-2013 07:56 AM
Hi Jouni
Great thanks - i will give that a go now and let you know.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide