Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    [SOLVED] HELP! Seem to be a spammer!?

    Scheduled Pinned Locked Moved Firewalling
    23 Posts 5 Posters 2.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • HermanH
      Herman @Grimson
      last edited by

      @grimson Thank you Grimson. Checked all I can. PfSense is my last hope. I just cannot find the compromised host.

      Any sugestios what tool to use finding the spammer. I am not that packets guru...

      Any help is appreciated.
      Herman

      Limburg | The Netherlands.
      It is nice to be important. But it is more important to be nice! | Failure, the best teacher it is!

      1 Reply Last reply Reply Quote 0
      • DerelictD
        Derelict LAYER 8 Netgate
        last edited by Derelict

        Block connections on LAN from any address to port TCP/25 and TCP/465 and TCP/587 then look at the firewall logs. Nobody will be able to send email while this is in place.

        OR

        Packet capture (Diagnostics > Packet Capture) on LAN for port TCP/25 (Then 465 and 587) for a while (say 10000 packets) then look at the traffic to see what's going on. This will not be disruptive.

        OR

        Examine the firewall states (Diagnostics > States) and see if you can find the problem. Filtering on something like :25 (or :465 or :587) might help.

        Does your ISP allow outbound SMTP connections (TCP/25)?

        Chattanooga, Tennessee, USA
        A comprehensive network diagram is worth 10,000 words and 15 conference calls.
        DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
        Do Not Chat For Help! NO_WAN_EGRESS(TM)

        HermanH 1 Reply Last reply Reply Quote 0
        • HermanH
          Herman @Derelict
          last edited by

          @derelict

          Hi Derelict,

          Created LAN rules to block all the mail traffic (25/465/587) except for the mailserver itself. Are the rules beneath created correctly? What is the best way to check if the rules are working from a host that isn't allowed to use port 25 etc.
          0_1533497251640_BlockSmtpLan.JPG

          Did run the packet capture for 1000 packets. First run is port 25. I have saved the .cap file and opened it with Wireshark. I see a lot here, but honestly I am not able to see what is a threat or not. The same with the States filter. Not really sure what to look for.

          Yes the ISP supports outbound mail through a smarthost (smtp.ziggo.nl)

          Hope this helps a bit. For now I have internet again. I have disabled the Exchange send connector till I have found the problem. This was the fourth time the ISP disconnected me.

          Kind regards,
          Herman

          Limburg | The Netherlands.
          It is nice to be important. But it is more important to be nice! | Failure, the best teacher it is!

          1 Reply Last reply Reply Quote 0
          • DerelictD
            Derelict LAYER 8 Netgate
            last edited by

            Just enable logging on that block rule then check the logs. That should tell you who is trying to send email to the outside.

            Chattanooga, Tennessee, USA
            A comprehensive network diagram is worth 10,000 words and 15 conference calls.
            DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
            Do Not Chat For Help! NO_WAN_EGRESS(TM)

            HermanH 3 Replies Last reply Reply Quote 1
            • HermanH
              Herman @Derelict
              last edited by

              @derelict

              Hi Derelict let me try that. So I asume that the rules are configured correctly?

              Regards,
              Herman

              Limburg | The Netherlands.
              It is nice to be important. But it is more important to be nice! | Failure, the best teacher it is!

              1 Reply Last reply Reply Quote 0
              • chpalmerC
                chpalmer
                last edited by

                Remember that if someone is spoofing one of your email addresses they can cause you issues as well. I haven't read through the thread completely yet so I may be speaking out of the context of given information.

                mxtoolbox.com is a good resource to get to know..

                Your DNS provider may have an SPF wizard. You might want to consider using it to build your SPF to disallow other servers from sending mail as you. Its not a perfect system but it does help.

                Good Luck!

                ps. make sure you don't have an open relay.

                Triggering snowflakes one by one..
                Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz on an M400 WG box.

                HermanH 1 Reply Last reply Reply Quote 0
                • HermanH
                  Herman @Derelict
                  last edited by

                  @derelict To be sure. I see the logs in System Logging, Dynamic View?

                  Limburg | The Netherlands.
                  It is nice to be important. But it is more important to be nice! | Failure, the best teacher it is!

                  1 Reply Last reply Reply Quote 0
                  • DerelictD
                    Derelict LAYER 8 Netgate
                    last edited by

                    I would just filter the logs for blocks to destination port 25.

                    Chattanooga, Tennessee, USA
                    A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                    DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                    Do Not Chat For Help! NO_WAN_EGRESS(TM)

                    1 Reply Last reply Reply Quote 0
                    • HermanH
                      Herman @chpalmer
                      last edited by

                      @chpalmer

                      Hello chpalmer,

                      Thanks for this tip. I am familiar with MX Toolbox. I am not really sure my domain provider has such a tool. Doesn’t MX Toolbox not have that tool? I have access to my DNS host file. I see no spf record in there. For the record, my Exchange Server is configured to send mail via a smart host from the ISP (Ziggo). I do not use MX records to send outbound (Ziggo, doesn’t allow that).

                      Any suggestions wil be welcome,

                      Regards,
                      Herman

                      Limburg | The Netherlands.
                      It is nice to be important. But it is more important to be nice! | Failure, the best teacher it is!

                      1 Reply Last reply Reply Quote 0
                      • HermanH
                        Herman @Derelict
                        last edited by

                        @derelict I have enabled the logging on the LAN Block rule and the allow rule for the Exchange server. But I don't see any logging regarding the rules. Not in normal view nor in Dynamic View. Am I looking at the right place here.

                        Thanks guys for you patience!

                        regards,
                        Herman

                        Limburg | The Netherlands.
                        It is nice to be important. But it is more important to be nice! | Failure, the best teacher it is!

                        1 Reply Last reply Reply Quote 0
                        • DerelictD
                          Derelict LAYER 8 Netgate
                          last edited by

                          Sounds like. Are you sure it is still ongoing?

                          0_1533509557984_Screen Shot 2018-08-05 at 3.48.07 PM.png

                          Chattanooga, Tennessee, USA
                          A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                          DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                          Do Not Chat For Help! NO_WAN_EGRESS(TM)

                          HermanH 1 Reply Last reply Reply Quote 1
                          • HermanH
                            Herman @Derelict
                            last edited by

                            @derelict The Source IP Address should be my WAN IP?
                            What is the ^and the $ meaning in the Destination port?

                            Limburg | The Netherlands.
                            It is nice to be important. But it is more important to be nice! | Failure, the best teacher it is!

                            DerelictD 1 Reply Last reply Reply Quote 0
                            • johnpozJ
                              johnpoz LAYER 8 Global Moderator
                              last edited by johnpoz

                              had you setup pfsense notifications? If so maybe something was going wrong on pfsense and spamming the notifications - or trying to notify you which were failing. Since you should of gotten them.

                              0_1533558988743_notifications.png

                              Or did you try and setup mailreport package? These would be the 2 ways that pfsense would/could be trying atleast to send mail. Which your isp might not like - especially if something when wrong or was misconfigured and sending out lots of them.

                              That is regex format looking for the port in question.

                              An intelligent man is sometimes forced to be drunk to spend time with his fools
                              If you get confused: Listen to the Music Play
                              Please don't Chat/PM me for help, unless mod related
                              SG-4860 24.11 | Lab VMs 2.8, 24.11

                              1 Reply Last reply Reply Quote 1
                              • DerelictD
                                Derelict LAYER 8 Netgate @Herman
                                last edited by

                                @herman said in HELP! Seem to be a spammer!?:

                                @derelict The Source IP Address should be my WAN IP?
                                What is the ^and the $ meaning in the Destination port?

                                No. You are looking for the inside address so you can find out who on the inside is doing it, so you want to capture on the inside interface (LAN) for all addresses. Unless, like @johnpoz said above, it's actually the firewall doing the emailing.

                                The fields there are regular expressions. ^25$ will only match 25. 25 might match 2579, 8254, 9925, 25341, etc.

                                Chattanooga, Tennessee, USA
                                A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                                DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                                Do Not Chat For Help! NO_WAN_EGRESS(TM)

                                HermanH 1 Reply Last reply Reply Quote 1
                                • HermanH
                                  Herman @Derelict
                                  last edited by

                                  @derelict & @johnpoz

                                  I have notifications configured. I dont think the firewall is the boogeyman because I setup the internal IP address (10.0.0.x) of the mailserver and mailing to an internal mailbox. Even now the outbound sendconnetor is temporary disabled, the test message from the pfSense arrives in the correct mailbox.

                                  Regards Herman

                                  Limburg | The Netherlands.
                                  It is nice to be important. But it is more important to be nice! | Failure, the best teacher it is!

                                  HermanH 1 Reply Last reply Reply Quote 0
                                  • HermanH
                                    Herman @Herman
                                    last edited by

                                    @Derelict & @johnpoz

                                    This is what i see in the Exchange que. A lot of these messages???

                                    0_1533572573166_1b99bd8b-67fd-4868-bee1-58915d41fabf-image.png

                                    Limburg | The Netherlands.
                                    It is nice to be important. But it is more important to be nice! | Failure, the best teacher it is!

                                    1 Reply Last reply Reply Quote 0
                                    • johnpozJ
                                      johnpoz LAYER 8 Global Moderator
                                      last edited by johnpoz

                                      Well if your not seeing it logged anywhere, then maybe the ISP is full of shit.. Not the first time that sort of thing every happened. Did your IP change recently - maybe it was the guy with your IP before you, etc.

                                      If your logging all outbound on 25, and not seeing anything logged.. Then its being sent by you - or you have an active state that is still in use? Did you check your state table? flush it after you create your block/logging rules? You have it logging on all possible inbound ports? You have any road warriors coming in via vpn that could be sending spam through vpn connection?

                                      edit: contoso.com - that is one of the domains MS uses in its examples ;)
                                      https://en.wikipedia.org/wiki/Contoso

                                      So your exchange is sending spam? If your letting exchange outbound, and your isp is saying your spamming - then yeah more than likely is your exchange. If you have all kinds of crap like that in its queue what else sort of nonsense is in there? And being sent or tried to being sent, etc.

                                      If you can not just check your exchange log for what it has sent, how about just sniff on you wan for outbound 25... And look to see what kind of stuff is being sent or attempted to be sent.. email is sent in the clear so its very easy to view all the info in email.

                                      Do you accept inbound email into your exchange? If so could be spammers bouncing off you, or using reflection spam.. PM whats your public IP - will check to see if can bounce spam off you, ie open relay.

                                      An intelligent man is sometimes forced to be drunk to spend time with his fools
                                      If you get confused: Listen to the Music Play
                                      Please don't Chat/PM me for help, unless mod related
                                      SG-4860 24.11 | Lab VMs 2.8, 24.11

                                      HermanH 1 Reply Last reply Reply Quote 1
                                      • HermanH
                                        Herman @johnpoz
                                        last edited by

                                        @johnpoz I would really love to pm you, if you teach me how to? God I feel so stupid right now...

                                        Limburg | The Netherlands.
                                        It is nice to be important. But it is more important to be nice! | Failure, the best teacher it is!

                                        HermanH 1 Reply Last reply Reply Quote 0
                                        • HermanH
                                          Herman @Herman
                                          last edited by

                                          "Failure, the best teacher it is!"

                                          Limburg | The Netherlands.
                                          It is nice to be important. But it is more important to be nice! | Failure, the best teacher it is!

                                          1 Reply Last reply Reply Quote 0
                                          • johnpozJ
                                            johnpoz LAYER 8 Global Moderator
                                            last edited by

                                            hehe..

                                            Dude look at my profile - you figured out how to follow me..

                                            Click the 3 dots and then start conversation - or just answer the one I started with you.

                                            0_1533578143913_hermanPM.png

                                            An intelligent man is sometimes forced to be drunk to spend time with his fools
                                            If you get confused: Listen to the Music Play
                                            Please don't Chat/PM me for help, unless mod related
                                            SG-4860 24.11 | Lab VMs 2.8, 24.11

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.