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

Slow SSH connection

Scheduled Pinned Locked Moved General pfSense Questions
21 Posts 4 Posters 4.1k 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.
  • R
    renatohtpc
    last edited by Mar 10, 2015, 8:28 PM

    I have setup a rule for the DMZ:

    Proto: IPv4 TCP/UDP
    Source: DMZ net
    Port: *
    Destination: 192.168.1.1
    Port: 53
    Gateway: *

    As for the LAN, I have 2 "wild card" rules for both IPv4* and IPv6* to any destination.

    is this enough?

    Thanks
    Renato

    1 Reply Last reply Reply Quote 0
    • H
      hda
      last edited by Mar 10, 2015, 8:55 PM Mar 10, 2015, 8:34 PM

      DMZ rules like that not only necessarily. I meant the wildcard rules for LAN, which you have. I assume the same for the DMZ.

      I just saw the sparse SSHd config you posted. Allowance for your LAN numbers in sshd.conf ?

      1 Reply Last reply Reply Quote 0
      • R
        renatohtpc
        last edited by Mar 10, 2015, 9:01 PM

        These are the rules I have.

        NOTE: Orange = DMZ
        Also, 192.168.1.10 is my PDC.

        Thanks again
        Renato

        ![Orange Rules.jpg](/public/imported_attachments/1/Orange Rules.jpg)
        ![Orange Rules.jpg_thumb](/public/imported_attachments/1/Orange Rules.jpg_thumb)
        ![LAN Rules.jpg](/public/imported_attachments/1/LAN Rules.jpg)
        ![LAN Rules.jpg_thumb](/public/imported_attachments/1/LAN Rules.jpg_thumb)

        1 Reply Last reply Reply Quote 0
        • K
          kejianshi
          last edited by Mar 10, 2015, 9:04 PM

          So did you try with just IP or just assuming thats not it?

          1 Reply Last reply Reply Quote 0
          • R
            renatohtpc
            last edited by Mar 10, 2015, 9:12 PM

            I will try the IP approach first thing in the morning when my users (wife and daughters) are not online so that I can swap firewall :)

            Thanks again
            Renato

            1 Reply Last reply Reply Quote 0
            • R
              renatohtpc
              last edited by Mar 11, 2015, 11:09 AM

              OK, just tried SSH'ing into the server using the ip address. Same problem. About 20 secs lag time from entering username to being prompted for password.

              Rebooted server and tried again using hostname and IP address.  Same results in both cases.

              Thanks
              Renato

              1 Reply Last reply Reply Quote 0
              • K
                kejianshi
                last edited by Mar 11, 2015, 11:28 AM Mar 11, 2015, 11:19 AM

                How much processor does the server have?  And the client?  And bandwidth?  Is the crypto extremely heavy?

                I will test mine now and tell you the time.

                Maybe 3 seconds from beginning to end…

                1 Reply Last reply Reply Quote 0
                • H
                  hda
                  last edited by Mar 11, 2015, 2:59 PM Mar 11, 2015, 11:28 AM

                  Allow for ICMP local networks.
                  You could start broad experiment with giving the DMZ the comparable wildcard rules as your LAN.
                  Or otherwise with your few rules, see in log [Status: System logs: Firewall] what is happening.

                  1 Reply Last reply Reply Quote 0
                  • J
                    johnpoz LAYER 8 Global Moderator
                    last edited by Mar 11, 2015, 6:07 PM Mar 11, 2015, 6:00 PM

                    search mydomain.net
                    nameserver 71.242.0.12 <== Verizon DNS1
                    nameserver 71.252.0.12 <== Verizon DNS2

                    So your pointing your ssh server to public dns then hitting it from private IP that it tries to do a PTR on I would assume..  So there could be delay there for sure.

                    So see attached image as example..  I started sniff on pfsense (which is where I point boxes too for dns)  I then hit 192.168.1.7 from 192.168.1.100 - you can clearly see the .7 box ask pfsense .253 (its dns) for the PTR of the IP that was logging in with ssh.  It my case pfsense answers, in your case I find it highly unlikely versizon dns knows about your rfc1918 address space ;)

                    I do believe you can turn it off with usedns no on your sshd box.  Or setup your sshd box to use something what can resolve your rfc1918 address space via PTR.

                    queryforsshclient.png
                    queryforsshclient.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
                    • H
                      hda
                      last edited by Mar 11, 2015, 6:47 PM Mar 11, 2015, 6:40 PM

                      @johnpoz:

                      …
                      So your pointing your ssh server to public dns then hitting it from private IP that it tries to do a PTR on I would assume..  So there could be delay there for sure.
                      ...

                      Yeah that's a point, I judged mydomain.net as mydomain.local. But then I would assume DNS Resolver (localhost) could handle it before remote resolving ?.

                      So OP, is the pfSense not running a DNS or the DNS Forwarder ?

                      1 Reply Last reply Reply Quote 0
                      • J
                        johnpoz LAYER 8 Global Moderator
                        last edited by Mar 12, 2015, 2:47 AM

                        does not matter what your forward domain is be it public or not.. when you hit a ssh server its going to do a PTR for the IP that you came from.  If you connect from rfc1918 IP you better be pointing at a local dns that has the zones for your local IP ranges or your going to see a delay.

                        Unless you turn that feature off in ssh, which is the usedns no

                        It will still do dns but that should disable the PTR request.  Simple enough to validate with a sniff.

                        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
                        • K
                          kejianshi
                          last edited by Mar 12, 2015, 3:46 AM

                          Yeah - Mine is using 128.0.0.1 locally and the root servers in unbound, so maybe thats why I'm not getting the huge delay.

                          At any rate, with such a big delay but without failure, I figured DNS must be involved.

                          1 Reply Last reply Reply Quote 0
                          21 out of 21
                          • First post
                            21/21
                            Last post
                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                            This community forum collects and processes your personal information.
                            consent.not_received