Solved

Need to Open SMTP port and redirect it to Exchange server Cisco PIX 501

Posted on 2006-10-29
6
2,592 Views
Last Modified: 2013-11-16
I need to open port 25 on my pix 501 and forward it to my internal exchange server with ip 192.168.1.5.  I tried doing that by looking at some posts but am not sure if I did it right because when I do telnet 111.111.111.111 25, I get an error “ could not open connection to the host on port 24.  Please note that I have replaced my public ip with 111.111.111.111 for security reasons :-).  Please let me know if the port 25 is open and is being forward to my exchange server and if telent is the way to test it. Thank you for you help.




Building configuration...
: Saved
:
PIX Version 6.3(5)
interface ethernet0 auto
interface ethernet1 100full
nameif ethernet0 outside security0
nameif ethernet1 inside security100
enable password cdS8OVu02pgL9w/8 encrypted
passwd cdS8OVu02pgL9w/8 encrypted
hostname pixfirewall
domain-name royalfitness.local
clock timezone EAST -6
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
no fixup protocol smtp 25
fixup protocol sqlnet 1521
fixup protocol tftp 69
names
access-list inside_outbound_nat0_acl permit ip any 192.168.100.0 255.255.255.224
access-list inside_outbound_nat0_acl permit ip 192.168.1.0 255.255.255.0 192.168.100.0 255.255.255.0
access-list outside_cryptomap_dyn_20 permit ip any 192.168.100.0 255.255.255.224
access-list splitacl permit ip 192.168.1.0 255.255.255.0 192.168.100.0 255.255.255.0
access-list inbound_acl permit tcp any host 111.111.111.111 eq 3389
access-list outside_in permit tcp any host 111.111.111.111 eq smtp
access-list outside-in permit tcp any host 111.111.111.111 eq smtp
pager lines 24
mtu outside 1500
mtu inside 1500
ip address outside 111.111.111.111 255.255.255.248
ip address inside 192.168.1.1 255.255.255.0
ip audit info action alarm
ip audit attack action alarm
ip local pool VPNPool 192.168.100.10-192.168.100.20
pdm location 192.168.1.0 255.255.255.255 inside
pdm location 192.168.1.2 255.255.255.255 inside
pdm location 192.168.1.0 255.255.255.0 inside
pdm location 201.194.184.2 255.255.255.255 outside
pdm location 192.168.100.0 255.255.255.0 outside
pdm location 0.0.0.0 255.255.255.255 inside
pdm location 192.168.1.0 255.255.255.0 outside
pdm location 192.1.10.6 255.255.255.255 inside
pdm location 10.1.10.6 255.255.255.255 inside
pdm location 192.168.1.5 255.255.255.255 inside
pdm logging informational 100
pdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 0 access-list inside_outbound_nat0_acl
nat (inside) 1 0.0.0.0 0.0.0.0 0 0
static (inside,outside) tcp 111.111.111.111 3389 10.1.10.6 3389 netmask 255.255.255.255 0 0
static (inside,outside) tcp 111.111.111.111 smtp 192.168.1.5 smtp netmask 255.255.255.255 0 0
access-group outside_in in interface outside
route outside 0.0.0.0 0.0.0.0 68.239.84.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
http server enable
http 0.0.0.0 0.0.0.0 outside
http 192.168.1.0 255.255.255.0 inside
http 0.0.0.0 0.0.0.0 inside
no snmp-server location
no snmp-server contact
snmp-server community public
no snmp-server enable traps
floodguard enable
sysopt connection permit-ipsec
crypto ipsec transform-set ESP-3DES-MD5 esp-3des esp-md5-hmac
crypto dynamic-map outside_dyn_map 20 set transform-set ESP-3DES-MD5
crypto map outside_map 65535 ipsec-isakmp dynamic outside_dyn_map
crypto map outside_map client configuration address respond
crypto map outside_map client authentication LOCAL
crypto map outside_map interface outside
isakmp enable outside
isakmp identity address
isakmp keepalive 10
isakmp nat-traversal 20
isakmp policy 1 authentication pre-share
isakmp policy 1 encryption 3des
isakmp policy 1 hash sha
isakmp policy 1 group 2
isakmp policy 1 lifetime 86400
isakmp policy 20 authentication pre-share
isakmp policy 20 encryption 3des
isakmp policy 20 hash md5
isakmp policy 20 group 2
isakmp policy 20 lifetime 86400
vpngroup saavpn address-pool VPNPool
vpngroup saavpn dns-server 192.168.1.5
vpngroup saavpn wins-server 192.168.1.5
vpngroup saavpn split-tunnel splitacl
vpngroup saavpn idle-time 1800
vpngroup saavpn password ********
vpngroup royal idle-time 1800
vpngroup royal password ********
telnet 0.0.0.0 0.0.0.0 outside
telnet 192.168.1.0 255.255.255.0 outside
telnet 192.168.1.0 255.255.255.255 inside
telnet 0.0.0.0 0.0.0.0 inside
telnet timeout 5
ssh 0.0.0.0 0.0.0.0 outside
ssh timeout 5
console timeout 0
dhcpd address 192.168.1.25-192.168.1.55 inside
dhcpd dns 192.168.1.5 199.45.32.43
dhcpd wins 192.168.1.5
dhcpd lease 3600
dhcpd ping_timeout 750
dhcpd auto_config outside
dhcpd enable inside
username vpnadmin password 30mrCM7hnW6aPDmz encrypted privilege 15
terminal width 80
Cryptochecksum:26a602b6896fa7414a8177a8dc587d6c
: end
[OK]

0
Comment
Question by:netcomp
  • 3
  • 2
6 Comments
 
LVL 79

Accepted Solution

by:
lrmoore earned 350 total points
Comment Utility
Given what you have:

>no fixup protocol smtp 25
> access-list outside_in permit tcp any host 111.111.111.111 eq smtp
>access-group outside_in in interface outside
>static (inside,outside) tcp 111.111.111.111 smtp 192.168.1.5 smtp netmask 255.255.255.255 0 0

There is no reason why it won't work...

Check the default gateway of the server....

You could use "interface" as below:

>static (inside,outside) tcp interface smtp 192.168.1.5 smtp netmask 255.255.255.255 0 0
> access-list outside_in permit tcp any interface outside eq smtp
>access-group outside_in in interface outside



0
 
LVL 20

Assisted Solution

by:calvinetter
calvinetter earned 150 total points
Comment Utility
 Agree w/ lrmoore that the config looks good, but after you added the "static (inside,outside)" entry, did you also run the following?
 clear xlate
 clear local

>when I do telnet 111.111.111.111 25, I get an error...
  If you tried this from the inside, this is expected: PIX won't allow you to directly access your public IP from behind the PIX.  If you tried this from an external location outside the PIX, then something is amiss.

  Just to avoid confusion, I'd remove the almost-identically named ACL...
no access-list outside-in permit tcp any host 111.111.111.111 eq smtp

cheers
0
 
LVL 1

Author Comment

by:netcomp
Comment Utility
Thanks for all of your help. I wanted to ask one last thing. If I  just wanted to rediract another port to the same server(port  443) using the same access list, is that possible. If so can you give me the commands. Is there a limit to the opening ports on one access list. Thank again for all of your help.
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 79

Expert Comment

by:lrmoore
Comment Utility
Sure, just keep adding access-list commands with the port #

> access-list outside_in permit tcp any host 111.111.111.111 eq www
> access-list outside_in permit tcp any host 111.111.111.111 eq https
> access-list outside_in permit tcp any host 111.111.111.111 eq pop3
<etc>
As long as you also have the statics to match
static (inside,outside) tcp 111.111.111.111 www 192.168.1.5 www netmask 255.255.255.255
static (inside,outside) tcp 111.111.111.111 https 192.168.1.5 https netmask 255.255.255.255
static (inside,outside) tcp 111.111.111.111 pop3 192.168.1.5 pop3 netmask 255.255.255.255

Only real limit is how many lines of config you can hold..couple of hundred maybe.. then you want to look at alternatives..
0
 
LVL 1

Author Comment

by:netcomp
Comment Utility
I noticed that you have “www” or “hhtps”  instead of port number. I assume that the pix knows for instance that www is port 80. If so , I was just wandring why did we have to do “no fixup protocol smtp 25” for the smtp port. Thanks , this would be my last questions  :-) . Thank you again,
0
 
LVL 79

Expert Comment

by:lrmoore
Comment Utility
no reason , just alternatives
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Wikipedia defines 'Script Kiddies' in this informal way: "In hacker culture, a script kiddie, occasionally script bunny, skiddie, script kitty, script-running juvenile (SRJ), or similar, is a derogatory term used to describe those who use scripts or…
If you are like regular user of computer nowadays, a good bet that your home computer is on right now, all exposed to world of Internet to be exploited by somebody you do not know and you never will. Internet security issues has been getting worse d…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now