Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

So, my ISP unblocked port 25 for my IP, and now my email server is being used for sending spam.

I just need it to work only from my localhost, and thats it.

How do I configure Windows firewall to do that? I don't want outsiders sending emails from my PC.

share|improve this question

closed as not a real question by Oliver Salzburg Oct 8 '12 at 20:44

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Not sure about doing so from a firewall perspective, but you should be able to start the mail daemon on a specific IP instead of 0.0.0.0. –  UtahJarhead Oct 7 '12 at 22:44
    
Not a clear question. The SMTP port 25 is NOT the PC local port 25 but the mail server remote port 25. Why you don't say simply that your email address has been "hacked" and controlled by somebody else to send spam. This is not related to what your ISP are doing or not (and not about your PC FW). Just tell your ISP to cancel the email account you have and that's all. –  climenole Oct 7 '12 at 23:02
2  
@climenole: I don't think that's the case at all. It's an smtp server he's running that is being used as an open relay. He wants it only accessible from localhost so only his applications can hook up with it. –  UtahJarhead Oct 8 '12 at 1:40
    
Well, If you want to get it reopened please give more details. What version of windows? What mail server? How do you know your mail server is being used to send spam? We really need more details to help you help us. Edit in these bits of information, and we could get this question reopened. –  Journeyman Geek Oct 9 '12 at 1:10
    
@Highstrike: why not just tell your ISP to block port 25 inbound again? If you only need the mail server to accept mail from localhost and not the Internet, there is no need for your ISP to unblock the port. If you do want to accept mail from the Internet, configure your SMTP server to require secure authentication. –  rob Oct 9 '12 at 1:45

1 Answer 1

Sounds like you are running an open relay. (Probably by accident.)

Since you didn't specify what mail server software you're using, it's impossible to give specific advice on how to secure it, though Google will turn up this information.

As for your Windows Firewall, you just need to add an output rule blocking port 25 (I don't have a Windows 7 box handy or I'd make you some nice screenshots). You still should secure the mail server, though, since the firewall might fail, somebody might delete the rule, you may get a virus, etc.

For a high-level overview of what you should do to secure a mail server, see this question on Server Fault: Fighting Spam - What can I do as an: Email Administrator, Domain Owner, or User?

share|improve this answer
1  
The mail software i am running is less important, i want to block all external (remote) access (and only allow 127.0.0.1) from port 25 using windows firewall, that is all. Inbound or Outbound rule? –  Highstrike Oct 8 '12 at 5:13
    
I already said it's outbound. As for your mail server software, you were warned. –  Michael Hampton Oct 8 '12 at 5:20
1  
If i block port 25 in outbound then my mail server will stop working Resolved MX for 'gmail.com' to 173.194.70.26 Connecting to 173.194.70.26 Connection error.) even for the mail sent via localhost (127.0.0.1) –  Highstrike Oct 8 '12 at 5:50
    
Maybe now you'll consider doing it right? :) –  Michael Hampton Oct 8 '12 at 13:23
2  
You still do not understand, i simply wish to NOT ALLOW external ips acces my port 25, only my machine, what is that so hard to understand? shouldnt it be inbound then? –  Highstrike Oct 8 '12 at 19:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.