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

Configure pix 501 for mail

wade.hughes
Level 1
Level 1

I am having trouble configuring my Cisco pix 501 to work with my mail server.To start of I will describe my environment.

I have a DLS router to connect to the internet. I connect the Pix to the DSL router then connect the pix to a switch. On the switch I have the mail server and several clients. IP address are the following.

DSL Router Internal: 10.10.10.1

Pix External: 10.10.10.2

Pix internal: 20.20.20.1

Mail server: 20.20.20.10

Client network: 20.20.20.0

MX record: 192.168.2.2

The DSL router has a route on its route table to send any traffic for 20.20.20.0 255.255.255.0 to 10.10.10.2 (the external interface of the cisco pix)

The DSL router has a port forward for port 25 to 20.20.20.10. This worked with out the firewall when I had the mail server plugged into the DSL router and I changed the mail server IP address to 10.10.10.10 (the port forward was 25 -> 10.10.10.10 in this test)

This is the configuration I have on the cisco Pix firewall. I copied the configuration from http://www.cisco.com/en/US/products/hw/vpndevc/ps2030/products_configuration_example09186a0080094466.shtml with the changes listed and reasons below.

PIX Version 6.3(4)

interface ethernet0 auto

interface ethernet1 100full

nameif ethernet0 outside security0

nameif ethernet1 inside security100

enable password XXXXXX encrypted

passwd XXXXXX encrypted

hostname Pix

domain-name Cisco.com

fixup protocol dns maximum-length 512

fixup protocol ftp 21

fixup protocol h323 h225 1720

fixup protocol h323 ras 1718-1719

fixup protocol http 80

fixup protocol rsh 514

fixup protocol rtsp 554

fixup protocol sip 5060

fixup protocol sip udp 5060

fixup protocol skinny 2000

fixup protocol smtp 25

fixup protocol sqlnet 1521

fixup protocol tftp 69

names

access-list mysmtp permit tcp any host 20.20.20.10 eq smtp

pager lines 24

mtu outside 1500

mtu inside 1500

ip address outside 10.10.10.2 255.255.255.0

ip address inside 20.20.20.1 255.255.255.0

ip audit info action alarm

ip audit attack action alarm

pdm logging informational 100

pdm history enable

arp timeout 14400

global (outside) 1 interface

nat (inside) 1 0.0.0.0 0.0.0.0 0 0

access-group mysmtp in interface outside

route outside 0.0.0.0 0.0.0.0 10.10.10.1 1

timeout xlate 0:05:00

timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 rpc 0:10:00 h225 1:00:00

timeout h323 0:05:00 mgcp 0:05:00 sip 0:30:00 sip_media 0:02:00

timeout uauth 0:05:00 absolute

aaa-server TACACS+ protocol tacacs+

aaa-server TACACS+ max-failed-attempts 3

aaa-server TACACS+ deadtime 10

aaa-server RADIUS protocol radius

aaa-server RADIUS max-failed-attempts 3

aaa-server RADIUS deadtime 10

aaa-server LOCAL protocol local

http server enable

http 20.20.20.0 255.255.255.0 inside

no snmp-server location

no snmp-server contact

snmp-server community public

no snmp-server enable traps

floodguard enable

telnet 20.20.20.0 255.255.255.0 inside

telnet timeout 5

ssh timeout 5

console timeout 0

dhcpd address 20.20.20.2-20.20.20.254 inside

dhcpd lease 3600

dhcpd ping_timeout 750

dhcpd auto_config outside

terminal width 80

Cryptochecksum:181cc440c44ce21a49c936a0d97a6adb

: end

The differences between the web configuration and mine

I am not using NAT so I left the default.

I have not added a static route for MX record to internal IP address. Do I need to do this on the firewall? For example static (inside,outside) 20.20.20.10 192.168.2.2 netmask 255.255.255.255?

I did not do a route inside as I do not have a router on the inside of the firewall.

I have tried a n fixup protocol smtp bit this did not fix the issue.

A few other things to note. All traffic inside the firewall can get to the internet. For example I can surf the net on the mail server. If I try to telnet to 20.20.20.10 25 on anything inside the firewall it works. If I try it from anything outside the firewall it does not work.

If any one can point me in the right direction it would be great

2 Replies 2

fedrodri
Level 1
Level 1

Hi,

Historically the PIX has been a NAT device, beside a Firewall, so that means that even if you are bypassing NAT, you have to specify a NAT rule for that... In other words, if you want to bypass NAT for your mail server, for access from the outside, then you have to tell the PIX to do so. Inbound traffic is only allowed if you have a "bi-directional" NAT rule, which can be accomplished with an static statement (identity NAT) or a NAT 0 + ACL statement:

static (inside,outside) 20.20.20.10 20.20.20.10

or,

access-list nonat permit ip host 20.20.20.10 any

nat (inside) 0 access-list nonat

Of course, this is not all; you also need to allow or open the desired ports/protocols on the outside interface (with an ACL, which you already have).

Now, regarding the MX-Record, if it is pointing to 192.168.2.2, then you might want to NAT the internal mail server to that IP:

static (inside,outside) 192.168.2.2 20.20.20.10

And, make sure that the DSL router routes all traffic destined to 192.168.2.2 to the PIX.

Hope that helps!

Federico Rodriguez

Hi Federico,

Yes that did help thank you. mail traffice is now coming and going.

Thanks

Review Cisco Networking for a $25 gift card