Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In order to prevent spam on my openVPN servers, port 25 was blocked on my openVPN servers. if a user connects to my openVPN server and then tries to send emails via web-based or desktop bulk mailer, will the mails still gets delivered even though i have blocked port 25 on the server?

What is the best way to prevent spam on my openVPN servers and how to ?

share|improve this question

What is the best way to prevent spam on my openVPN servers and how to ?

This depends on the purpose of your VPN. If you want to use it to allow people to access internal resources of your organization, simply block all outgoing traffic originating from the VPN at your firewall. I don't know, but maybe OpenVPN even offers an option for this. People must then configure their VPN clients to only route traffic for the internal resources through the VPN.

If you want to use it as a proxy/anonymity network, meaning users should route all their traffic through the VPN, things get more difficult or impossible, depending on what restrictions you consider acceptable for the users.

If you want to block outgoing port 25 traffic, this won't be enough, as there are still port 465 (SMTPS) and 587 (Submission). But blocking those means users cannot use their desktop mail programs (Thunderbird, Outlook etc) at all, a heavy restriction. Theoretical, this could be solved by offering a properly configured (authentication, sending rate limits) internal SMTP server, but this isn't working so good with SPF etc. these days.

Blocking spam submission via web mailers (Yahoo, GMail, Hotmail etc) is even more difficult. The first option is, again, blocking access to them, preventing users from legitimate use. The second would be to force the use of a rate-limiting proxy that allows only a limited numbers of connections per minute for any given site.

share|improve this answer

Internal or external webmail (can not protect against other than blocking access to those sites/services)? Which direction (in or out) on port 25? Blocking both directions on port 25 effectively kills off any SMTP traffic.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.