Outbound smtp via gmail - rule for pfSense

How to configure outbound SMTP → gmail?
got a IoT vlan, 172.16.100.0
got a Raspberry Pi Zero-Wifi that takes a photo of a meter reading (analog) and then needs to email it to me.
All works when I do an allow any/all outbound, but I want to close this network for no outbound/WAN access except for this one host for this one purpose.

I’ve created a alias with the following ports (587, 465, 993, 995)
Created a rule that allows this alias to any outbound ip, but email sending via smtp.gmail.com is still failing,

Advise please

G

Look at the firewall rules and see what is failing or just open all ports to SMTP.GMIAL.COM and see what ports it connects to using pftop and only open those.

will go look how to use pftop, only started using pfSense last week, so noooooooob.

Thanks.

G

Strange…
172.16.20.29 is my laptop, I’ve ssh’d into the Pi Zero.
172.16.100.21 is the pi Zero (the device we’re trying to get to send the email)
66.102.1.109 is one of the 2 IP’s assigned to smtp.gmail.com (2nd is 66.102.1.108)
172.16.10.21 is a mqqt host
from this id say all i should need to open up outbound on my 172.16.100.0 network is access to port 587
strangely though thats not working.
I"d tried just this port, I’ve tried previous mentioned ports, I’ve even added port 53 to it.
I’ve tried not doing on port, but rather simply saying allow via alias that list smtp.gmail.com
no luck.
this screen grab is of a allow all.

Resolved, required UDP on 53

G

1 Like