Link to home
Start Free TrialLog in
Avatar of Manuel
ManuelFlag for United States of America

asked on

Cannot access Mail Server behind PIX

Hi,

        I setup Mdaemon Mail Server installed on a machine which is behind of a PIX. On the PIX I have the correct port opened and pointing to the correct PC. I am using Mdaemon for a website which let's say it's called xyz.com. Well I am using Zonedit.com as my DNS servers for the website. In there website there is an option for me to put a MX server so I put the Public IP of the PIX. However, when I send an email to the Mail Server from the outside of the PIX. Mdaemon does not recieve it? What could I be doing wrong.


                                          Thank You in Advance
Avatar of IPKON_Networks
IPKON_Networks

You can either set a static route on the PIX to direct ALL traffic to the mdaemon server from the outside, or you assign a NAT'd address for your mail server and this is used on the MX record. Then, you would need a NAT rule on the PIX to direct all traffic aimed at that address to your PIX.

Hope this helps
Barny
IPKON Networks Ltd
Avatar of Manuel

ASKER

Thanks for the reply.

I already put a static statement in the PIX which directs Mail Traffic to the inside host which is running the Mail Server.

                           Thank You
Avatar of Keith Alabaster
Have you assigned a permit statement as well?
Have you assigned the ACL to the interface?

static (inside,outside) 192.168.1.1 10.0.0.1 netmask 255.255.255.255 0 0
access-list outside-in permit tcp any host 192.168.1.1 eq smtp
access-group outside-in in interface outside

where 192.168.1.1 is the external IP you are using and 10.0.0.1 is the internal IP.
Avatar of Manuel

ASKER

Yes I did here is a post of the config.

                                                            Thank You
PIX Version 6.3(5)
interface ethernet0 100full
interface ethernet1 100full
nameif ethernet0 outside security0
nameif ethernet1 inside security100
enable password xxxxxxxxxx encrypted
passwd xxxxxxxxx encrypted
hostname pixfirewall
domain-name pix.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 pptp 1723
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 101 permit ip 10.1.1.0 255.255.255.0 10.1.2.0 255.255.255.0
access-list allow_inbound permit tcp any interface outside eq smtp
access-list allow_inbound permit tcp any interface outside eq pop3
access-list allow_inbound permit tcp any interface outside eq www
access-list allow_inbound permit icmp any any source-quench
access-list allow_inbound permit tcp any interface outside eq ssh
access-list allow_inbound permit tcp any host 216.x.x.236 eq www
access-list allow_inbound permit tcp any host 216.x.x.236 eq ssh
access-list allow_inbound permit tcp any host 216.x.x.236 eq h323
access-list allow_inbound permit tcp any host 216.x.x.236 eq 5060
access-list allow_inbound permit tcp any interface outside eq pptp
access-list allow_inbound permit gre any interface outside
access-list deny_outbound deny tcp any host 63.x.x.73 eq www
access-list deny_outbound deny tcp any host 63.x.x.73 eq https
access-list deny_outbound deny tcp any host 209.x.x.7 eq https
access-list deny_outbound permit ip any any
access-list deny_outbound permit gre any any
no pager
logging on
logging timestamp
logging monitor debugging
logging trap notifications
logging queue 24
logging host inside 10.1.1.23
icmp deny any outside
mtu outside 1500
mtu inside 1500
ip address outside 216.x.x.85 255.255.255.0
ip address inside 10.1.1.1 255.255.255.0
ip audit info action alarm
ip audit attack action alarm
ip local pool ippool 10.1.2.1-10.1.2.254
pdm location 10.1.1.6 255.255.255.255 inside
pdm logging informational 100
pdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 0 access-list 101
nat (inside) 1 10.1.1.0 255.255.255.0 0 0
static (inside,outside) tcp interface www 10.1.1.6 www netmask 255.255.255.255 0 0
static (inside,outside) tcp interface ssh 10.1.1.6 ssh netmask 255.255.255.255 0 0
static (inside,outside) tcp interface pptp 10.1.1.23 pptp netmask 255.255.255.255 0 0
static (inside,outside) tcp interface smtp 10.1.1.2 smtp netmask 255.255.255.255 0 0
static (inside,outside) tcp interface pop3 10.1.1.2 pop3 netmask 255.255.255.255 0 0
static (inside,outside) 216.x.x.236 10.1.1.7 netmask 255.255.255.255 0 0
access-group allow_inbound in interface outside
access-group deny_outbound in interface inside
route outside 0.0.0.0 0.0.0.0 216.x.x.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 sip-disconnect 0:02:00 sip-invite 0:03: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
aaa authentication ssh console LOCAL
http server enable
http 10.1.1.0 255.255.255.0 inside
snmp-server host inside 10.1.1.23
no snmp-server location
no snmp-server contact
snmp-server community nyc4u2me
snmp-server enable traps
floodguard enable
sysopt connection permit-ipsec
crypto ipsec transform-set myset esp-3des esp-md5-hmac
crypto dynamic-map dynmap 10 set transform-set myset
crypto map mymap 10 ipsec-isakmp dynamic dynmap
crypto map mymap client authentication LOCAL
crypto map mymap interface outside
isakmp enable outside
isakmp identity address
isakmp nat-traversal 20
isakmp policy 10 authentication pre-share
isakmp policy 10 encryption 3des
isakmp policy 10 hash md5
isakmp policy 10 group 2
isakmp policy 10 lifetime 86400
vpngroup vpn3000 address-pool ippool
vpngroup vpn3000 default-domain pix.com
vpngroup vpn3000 split-tunnel 101
vpngroup vpn3000 idle-time 1800
vpngroup vpn3000 password ********
vpngroup vmr2 address-pool ippool
vpngroup vmr2 default-domain pix.com
vpngroup vmr2 split-tunnel 101
vpngroup vmr2 idle-time 1800
vpngroup vmr2 password ********
vpngroup grace address-pool ippool
vpngroup grace default-domain pix.com
vpngroup grace split-tunnel 101
vpngroup grace idle-time 1800
vpngroup grace password ********
telnet timeout 30
ssh 10.1.1.0 255.255.255.0 inside
ssh timeout 60
console timeout 0
username vmr2 password xxxxxxxxxxxxxxxxxxxxxxxxxx encrypted privilege 15
username victor password xxxxxxxxxxxxxxxxx encrypted privilege 3
privilege show level 15 command access-group
privilege clear level 15 command access-group
terminal width 80
banner motd Unauthorized access and use of this network/device will be prosecute                                                       d.
Cryptochecksum:41c3135a8e5bfdfb05c1fd7112f8ae1c
: end
>In there website there is an option for me to put a MX server so I put the Public IP of the PIX.
  How long ago did you make the MX entry in DNS? It typically takes up to 24-72 hrs for DNS info to propagate fully among other providers' DNS servers.  But if you're pointing to the Zonedit.com's DNS servers as the DNS servers for your external workstation for testing, you should be able to resolve your domain & send email to it.

Also, I believe Mdaemon may be an ESMTP server.  Run the following, then retest sending inbound mail:
  no fixup protocol smtp 25
  clear xlate

cheers
Avatar of Manuel

ASKER

I put the MX change 6 days ago, I did the changes to the PIX and still no change. Also, another question is that in Zoneedit.com when I look under the Mail Server I get what you see below. Before when I did the changes to the MX's in Zoneedit.com I entered only the PIX outside IP 216.X.X.85 and automatically Zoneedit.com changed the server to what you see below.
                                                              Thank You

Domain                     Server                        Rank
xyz.com                    mail.xyz.com              0
ASKER CERTIFIED SOLUTION
Avatar of calvinetter
calvinetter
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Manuel

ASKER

Ok I tried to ping xyz.com and mail.xyz.com from an outside workstation. When I did this is the output from the ping command. However, I am not getting replies back because on the PIX I am blocking pings. Also, between the mail server (10.1.1.2) and the PIX there is only a Switch that is all nothing is running NAT expect for the PIX.

                                                                                        Thank You
Pinging mail.xyz.com [216.x.x.85] with 32 bytes of data:

Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 216.x.x.85:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
Avatar of Manuel

ASKER

I also re-applied the ACL to the outside interface.
Avatar of Manuel

ASKER

Also, another thing why is it that if I have SMTP 25 and POP3 open on the PIX when I do a port scan on a website it states that these ports are closed?


                                    Thanks for the help.
Your PIX config looks good.  Are you sure there isn't a firewall enabled on the server itself? Maybe a silly question, but are you sure the mail services are running on this server?  If you run: "netstat -an" on the mail server, do you see entries similar to the following? (example is from a Windows box):
  Proto  Local Address          Foreign Address        State
  TCP    0.0.0.0:25               0.0.0.0:0                LISTENING
  TCP    0.0.0.0:110             0.0.0.0:0                LISTENING

On a PC in the server's local LAN (10.1.1.x), if you run a "portscanner" program & scan for TCP ports 25 & 110, pointing to the server's local IP (10.1.1.2), can you verify if the ports above show open or closed/filtered?
  Here's one of many free port scanners:
http://www.download.com/Advanced-Port-Scanner/3000-2085_4-10127847.html?tag=lst-0-1

cheers
Avatar of Manuel

ASKER

I did the port scan with the program you suggested and I got that 10.1.1.2 has 6 ports open and in those ports, ports 25 smtp is green which is opened, and port 110 pop3 is also green which states that it is opened. I tried again to send an email to a user which is defined on the Mail Server from a thirdparty such as gmail.com and nothing is in the inbox of that user.
                                   Thank You

C:\>netstat -an

Active Connections

  Proto  Local Address          Foreign Address        State
  TCP    0.0.0.0:25             0.0.0.0:0              LISTENING
  TCP    0.0.0.0:110            0.0.0.0:0              LISTENING
  TCP    0.0.0.0:135            0.0.0.0:0              LISTENING
  TCP    0.0.0.0:143            0.0.0.0:0              LISTENING
  TCP    0.0.0.0:366            0.0.0.0:0              LISTENING
  TCP    0.0.0.0:445            0.0.0.0:0              LISTENING
  TCP    0.0.0.0:587            0.0.0.0:0              LISTENING
  TCP    0.0.0.0:1000           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:3000           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:3389           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:29069          0.0.0.0:0              LISTENING
  TCP    0.0.0.0:45100          0.0.0.0:0              LISTENING
  TCP    10.1.1.2:139           0.0.0.0:0              LISTENING
Avatar of Manuel

ASKER

I got it. It's working now I restarted the Mail Server and now it is receving emails. Thank You so much for all the help.
No problem!