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

    BitTorrent traffic on ssh-port

    Scheduled Pinned Locked Moved General pfSense Questions
    12 Posts 3 Posters 1.6k 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.
    • D
      doejohn
      last edited by

      Umm, this is not the ssh on pfsense.

      pfsense is forwarding the (non-standard) port to a box in the DMZ.

      1 Reply Last reply Reply Quote 0
      • D
        doktornotor Banned
        last edited by

        Yeah, and the same applies. If you absolutely need those world open, you'll need to use something like Snort or Suricata and proper protocol rules related to SSH to block those. (Also will need to set SSH_PORTS and SSH_SERVERS on WAN variables tab accordingly)

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

          Just another example of why attempting security through obscurity is a fail.. Really the only actual reason to use a different port than 22 for your ssh would be to try and lower the log spam of bots hitting it, etc.. ;)  You seem to have hit on the complete opposite.. Funny really..

          So your forwarding inbound to some box of yours, or is this some customer behind pfsense that you manage?  If for your own connectivity - with dok here vpn would be the way to go..  If customer and they want ssh open.. Why are you on some odd port?  Guessing some high random which is where p2p normally runs..

          So your IP was at some point in swarm?  On this port as well?  That is really the only time you would see such large amounts of such traffic.

          I am curious how did you determine its p2p traffic exactly?  From that log info or did you sniff it?

          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
          • D
            doejohn
            last edited by

            What would a VPN buy me?

            It would do public-kay-authentication. The sshd is also configured to accept ONLY public-key-authentication for specific Groups from hosts with verified Hostkeys.

            So, what would be the security benefits of using a VPN?

            1 Reply Last reply Reply Quote 0
            • D
              doktornotor Banned
              last edited by

              @johnpoz:

              Just another example of why attempting security through obscurity is a fail.. Really the only actual reason to use a different port than 22 for your ssh would be to try and lower the log spam of bots hitting it, etc.. ;)  You seem to have hit on the complete opposite.. Funny really..

              Yeah this definitely is made worse by using those ephemeral ports for SSH server.

              So, what would be the security benefits of using a VPN?

              It'd never reach the SSH box. No SSH DoS-ed there.

              1 Reply Last reply Reply Quote 0
              • D
                doejohn
                last edited by

                And what would keep the torrent packets from hitting the VPN port?

                1 Reply Last reply Reply Quote 0
                • D
                  doktornotor Banned
                  last edited by

                  Errr, uh… nothing of course. You cannot control what gets sent to you on your edge firewall. If you think you are DoS-ed, go talk to your ISP.

                  1 Reply Last reply Reply Quote 0
                  • D
                    doejohn
                    last edited by

                    No, I don't think I'm DoS'ed. I think this are "ricochet" packets.

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

                      "And what would keep the torrent packets from hitting the VPN port?"

                      Normally you wouldn't run vpn a p2p port..

                      So your problem is your sshd has some sort of timeout when it gets hit X times with fail login..  Seen them quite often where possible login gets delayed for X number of seconds after failed attempt.. So sure failed logins can amount to what seems like a dos..

                      You could change ports would be what I would suggest.  Standard 22 would be best.. Or some odd port that is not random high.  You don't normally see p2p traffic on such ports like say 42 or something.  Look in your logs for a port that gets the least amount of noise and run it on that port ;)

                      As everyone I see lots of hits to 22, but I do not have 22 forwarded or open to the public.  Only vpn ports. 1194 and I run on tcp 443 as well.  This gets some hits sure - but far and few between that are not me logging in..  In the last 2881 hits on the firewall I see 12 hits to tcp 443 that was not me..  And to 1194 I see a whole 1 hit that was not me for udp that was allowed, and 1 that was blocked on tcp.

                      There is always going to be noise.. But you most likely will see far less to a vpn port, even when you run it on common tcp port like 443..

                      hitsto443.png
                      hitsto443.png_thumb

                      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
                      • D
                        doejohn
                        last edited by

                        @johnpoz:

                        So your problem is your sshd has some sort of timeout when it gets hit X times with fail login..  Seen them quite often where possible login gets delayed for X number of seconds after failed attempt.. So sure failed logins can amount to what seems like a dos..

                        You could change ports would be what I would suggest.  Standard 22 would be best..

                        On 22, thousands of script-kiddies are knocking. Even more than on some random p2p-port. This is why I changed ports.

                        I don't see what changing to VPN would buy me. The ricochet packets would arrive at the VPN port instead of the sshd-port.

                        Or some odd port that is not random high.  You don't normally see p2p traffic on such ports like say 42 or something.

                        Isn't 42 used by WINS? I'd exepct even more script-kiddies playing with WINS…

                        As everyone I see lots of hits to 22, but I do not have 22 forwarded or open to the public.  Only vpn ports. 1194 and I run on tcp 443 as well.  This gets some hits sure - but far and few between that are not me logging in..  In the last 2881 hits on the firewall I see 12 hits to tcp 443 that was not me..  And to 1194 I see a whole 1 hit that was not me for udp that was allowed, and 1 that was blocked on tcp.

                        Really? Nobody trying to break openvpn?

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