cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4644
Views
0
Helpful
15
Replies

problem with smtp server for logging on asa5505

goran ljubic
Level 1
Level 1

i have the asa5505 with asa8.4.5 and asdm 6.4.2. my asa work like site to site vpn with the other asa5505. i would be love that monitoring status of VPN. i enabled on asa logging, i puted address of smtp server, receipent email, source email, the problem is because my smtp server require authentication, TLS. how set configuration on asa5505?

configuration of logging for send notification on email:

smtps

port 587

server smtp.gmail.com

default-group-policy DfltGrpPolicy

authentication aaa mailhost

smtp-server 173.194.70.108

15 Replies 15

Hi Bro

I don't know much about TLS but I do know the commands shown below will work. I've done this too many times to know for sure, it will work like a charm. Just ensure your EMail Server supports Mail Relay.


logging enable
logging timestamp
logging list TEST level alerts
logging mail TEST
logging from-address FW01@cisco.com
logging recipient-address johnniewalker@cisco.com level alerts
logging device-id hostname


smtp-server 192.168.10.1

If you need more information on this, you could also refer to this URL https://supportforums.cisco.com/thread/2014922

P/S: If you think this comment is useful, please do rate them nicely :-)

Warm regards,
Ramraj Sivagnanam Sivajanam

yes, bro but my smtp server require the authentication and the server use tls? how do i set this configuration on asa5505

Hi Bro

Have you tried my sugegestion? If it doesn't work, then I believe Cisco ASA FW can't do this at all but if it does, well and good. Give it a try. This is because I have done this with many EMail Servers in the market, and I have not encountered any issues. Give it a try, and let me know if it works or don't


logging enable
logging timestamp
logging list TEST level 7
logging mail TEST
logging from-address FW01@cisco.com
logging recipient-address johnniewalker@cisco.com level 7

logging device-id hostname


smtp-server 192.168.10.1

If you need more information on this, you could also refer to this URL https://supportforums.cisco.com/thread/2014922

P/S: If you think this comment is useful, please do rate them nicely :-)

Warm regards,
Ramraj Sivagnanam Sivajanam

it doesn't work. my smtp server want authentication.

How do you know the smtp server wants authentication? Are you seeing any error logs that states this?

Warm regards,
Ramraj Sivagnanam Sivajanam

my mail account for outlook is configured with authentication for this smtp server. when i disable the authentication i can't send e-mail from outlook

Yes, I know your client email accont needs authentication but not for the FW. As long as the FW supported email relay, this is good enough. Have you tried the commands that I've proposed to you. I can't be wrong as I have done this too many times for many large corporations.

Warm regards,
Ramraj Sivagnanam Sivajanam

yes, i used the commands that you uswd but i can't send mail from asa5505

Can you paste your complete "show run logging" and "show run | i smtp" here?

Warm regards,
Ramraj Sivagnanam Sivajanam

Result of the command: "show run"

: Saved

:

ASA Version 8.2(1)

!

hostname ciscoasa

enable password csq7sfr0bQJqMGET encrypted

passwd 2KFQnbNIdI.2KYOU encrypted

names

name 192.168.5.0 PALATA

!

interface Vlan1

nameif inside

security-level 100

ip address 192.168.0.17 255.255.255.0

!

interface Vlan2

nameif outside

security-level 0

ip address 10.13.74.33 255.255.255.0

!

interface Ethernet0/0

switchport access vlan 2

!

interface Ethernet0/1

!

interface Ethernet0/2

!

interface Ethernet0/3

!

interface Ethernet0/4

!

interface Ethernet0/5

!

interface Ethernet0/6

!

interface Ethernet0/7

!

ftp mode passive

clock timezone CEST 1

clock summer-time CEDT recurring last Sun Mar 2:00 last Sun Oct 3:00

object-group service DM_INLINE_SERVICE_1

service-object ip

service-object tcp

service-object icmp echo

service-object icmp echo-reply

service-object tcp eq domain

service-object tcp eq ldap

service-object tcp eq smtp

object-group service DM_INLINE_SERVICE_2

service-object ip

service-object tcp eq domain

service-object tcp eq www

service-object tcp eq https

service-object tcp eq smtp

access-list outside_access_in extended permit object-group DM_INLINE_SERVICE_1 any any

access-list inside_access_in extended permit object-group DM_INLINE_SERVICE_2 192.168.0.0 255.255.255.0 any

access-list inside_nat0_outbound extended permit ip 192.168.0.0 255.255.255.0 PALATA 255.255.255.0

access-list outside_2_cryptomap extended permit ip 192.168.0.0 255.255.255.0 PALATA 255.255.255.0

pager lines 24

logging enable

logging asdm informational

logging mail errors

logging from-address xxx@gmail.com

logging recipient-address xxx@gmail.com level errors

logging class auth mail errors

logging class session mail errors

logging class vpn mail debugging

mtu inside 1500

mtu outside 1500

icmp unreachable rate-limit 1 burst-size 1

no asdm history enable

arp timeout 14400

global (outside) 1 interface

nat (inside) 0 access-list inside_nat0_outbound

nat (inside) 1 192.168.0.0 255.255.255.0

static (inside,outside) 10.13.74.35 192.168.0.22 netmask 255.255.255.255

static (inside,outside) 10.13.74.34 192.168.0.20 netmask 255.255.255.255 dns

access-group inside_access_in in interface inside

access-group outside_access_in in interface outside

route outside 0.0.0.0 0.0.0.0 10.13.74.1 1

route inside 0.0.0.0 0.0.0.0 192.168.0.17 tunneled

timeout xlate 3:00:00

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

timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00

timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00

timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute

timeout tcp-proxy-reassembly 0:01:00

dynamic-access-policy-record DfltAccessPolicy

aaa-server smtp.gmail.com protocol http-form

aaa-server smtp.gmail.com (outside) host 173.194.70.108

user-parameter xxx@gmail.com

password-parameter goran1975

aaa authentication telnet console LOCAL

http server enable

http 10.13.74.0 255.255.255.0 outside

http 192.168.0.0 255.255.255.0 inside

http 10.15.100.0 255.255.255.0 outside

no snmp-server location

no snmp-server contact

snmp-server enable traps snmp authentication linkup linkdown coldstart

virtual telnet 192.168.0.53

crypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmac

crypto ipsec security-association lifetime seconds 28800

crypto ipsec security-association lifetime kilobytes 4608000

crypto map outside_map 1 match address outside_2_cryptomap

crypto map outside_map 1 set pfs

crypto map outside_map 1 set peer 10.15.100.15

crypto map outside_map 1 set transform-set ESP-3DES-SHA

crypto map outside_map interface outside

crypto isakmp enable outside

crypto isakmp policy 10

authentication pre-share

encryption 3des

hash sha

group 2

lifetime 86400

telnet 192.168.0.0 255.255.255.0 inside

telnet timeout 5

ssh timeout 5

console timeout 0

dhcpd auto_config outside

!

threat-detection basic-threat

threat-detection statistics access-list

no threat-detection statistics tcp-intercept

webvpn

username xxx password AojCAMO/soZo8W.W encrypted privilege 15

username xxx@gmail.com password q4TBYQT9hrhqEJg7 encrypted

tunnel-group 10.15.100.15 type ipsec-l2l

tunnel-group 10.15.100.15 ipsec-attributes

pre-shared-key *

!

class-map inspection_default

match default-inspection-traffic

!

!

policy-map type inspect dns preset_dns_map

parameters

  message-length maximum 512

policy-map global_policy

class inspection_default

  inspect dns preset_dns_map

  inspect ftp

  inspect h323 h225

  inspect h323 ras

  inspect rsh

  inspect rtsp

  inspect esmtp

  inspect sqlnet

  inspect skinny 

  inspect sunrpc

  inspect xdmcp

  inspect sip 

  inspect netbios

  inspect tftp

  inspect icmp

!

service-policy global_policy global

smtps

port 587

server smtp.gmail.com

default-group-policy DfltGrpPolicy

authentication aaa mailhost

smtp-server 173.194.70.108

prompt hostname context

Cryptochecksum:15217a375a1ed15f915c173809a24a77

: end


Add These Lines
=================
logging mail debug
logging from-address ciscoasa@fw.com
logging recipient-address ???@gmail.com level debug
smtp-server 173.194.79.109     // smtp.gmail.com

Remove These Lines
=================
no smtp-server 173.194.70.108
no logging class auth mail errors
no logging class session mail errors
no logging class vpn mail debugging
no aaa-server smtp.gmail.com protocol http-form
no aaa-server smtp.gmail.com (outside) host 173.194.70.108
no user-parameter xxx@gmail.com
no password-parameter goran1975
no username xxx@gmail.com password q4TBYQT9hrhqEJg7 encrypted
no smtps
no port 587
no server smtp.gmail.com
no authentication aaa mailhost


Warm regards,
Ramraj Sivagnanam Sivajanam

again, nothing

Your config is good, my guess is the smtp-server that you're pointing to doesn't support SMTP Relay. Could you try few more other public smtp servers, if any luck :-)

Warm regards,
Ramraj Sivagnanam Sivajanam

can you give to me any public smtp server?

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card