How do I allow all possible IPs for Gmail servers through my ufw firewall?
Posted
by
nomadicME
on Ask Ubuntu
See other posts from Ask Ubuntu
or by nomadicME
Published on 2012-06-04T03:36:50Z
Indexed on
2012/06/04
4:47 UTC
Read the original article
Hit count: 276
I am currently using the following rule:
ufw allow out from my_local_ip to any port 587
This is a little too lax for my liking. I would like to tighten it up and restrict it to only gmail's smtp server ip addresses, but they are always changing. I used to just wait until an outgoing email didn't make it to its destination, then check syslog for the ip address that was blocked, then add that to the ufw configure script. However, now I have a need for much more reliability.
Is there any way to use smtp.gmail.com in ufw? I don't think so, but thought I would ask. Any other ideas? Thanks.
© Ask Ubuntu or respective owner