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

    TCP or UDP?

    Scheduled Pinned Locked Moved OpenVPN
    4 Posts 3 Posters 2.5k 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.
    • N
      naughtyusmaximus
      last edited by

      I haven't been able to find any good info on whether or not I should be using TCP or UDP for my OpenVPN server.  Does OpenVPN have error checking/ reliability protocols built in to negate the deficiencies of UDP?

      1 Reply Last reply Reply Quote 0
      • GruensFroeschliG
        GruensFroeschli
        last edited by

        OpenVPN "tunnels".
        You transmit over OpenVPN whatever you want. That can be AppleTalk, UDP, TCP, NetBIOS, etc.

        If you use TCP for OpenVPN that might create a Problem:
        http://sites.inka.de/~W1011/devel/tcp-tcp.html

        So if you can use UDP.
        There might be some cases where you HAVE to use TCP.
        Like when your OpenVPN connection is over a proxy.

        We do what we must, because we can.

        Asking questions the smart way: http://www.catb.org/esr/faqs/smart-questions.html

        1 Reply Last reply Reply Quote 0
        • Cry HavokC
          Cry Havok
          last edited by

          @naughtyusmaximus:

          I haven't been able to find any good info on whether or not I should be using TCP or UDP for my OpenVPN server.  Does OpenVPN have error checking/ reliability protocols built in to negate the deficiencies of UDP?

          Well, the man page says:

          OpenVPN is designed to operate optimally over UDP, but TCP capability is provided for situations where UDP cannot be used. In comparison with UDP, TCP will usually be somewhat less efficient and less robust when used over unreliable or congested networks.

          And the HowTo says:

          While OpenVPN allows either the TCP or UDP protocol to be used as the VPN carrier connection, the UDP protocol will provide better protection against DoS attacks and port scanning than TCP

          1 Reply Last reply Reply Quote 0
          • N
            naughtyusmaximus
            last edited by

            Right

            Thank you for that info Gruens, that is exactly the question I was meaning to ask.

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