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

    Cannot connect with RDP via openVPN

    Scheduled Pinned Locked Moved OpenVPN
    64 Posts 8 Posters 13.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.
    • I
      IrixOS
      last edited by

      I use openvpn to connect to my virtual servers at home.
      I can ping everything, but when I try to connect to my servers via RDP, the login takes too long and I get a message on the RDP client app on android that there is a network problem. I connect with 4G. It's the same network setup at home as before. (Has been covered in dust for a few years and I haven't touched the network since)

      OpenVPN and RDP has always worked correctly.
      I haven't tested it on a regular remote PC yet, it should work as before. I do have another smartphone in the meantime. There may be a bug in the phone or a bug in the openVPN connect app.

      I don't know what to double check anymore.

      All RDP settings on the windows servers are OK.

      Can someone help me and give me a tip?

      Thank you,

      M 1 Reply Last reply Reply Quote 0
      • M
        michmoor LAYER 8 Rebel Alliance @IrixOS
        last edited by

        @IrixOS do you see your firewall rules being hit?

        Firewall: NetGate,Palo Alto-VM,Juniper SRX
        Routing: Juniper, Arista, Cisco
        Switching: Juniper, Arista, Cisco
        Wireless: Unifi, Aruba IAP
        JNCIP,CCNP Enterprise

        I 1 Reply Last reply Reply Quote 0
        • I
          IrixOS @michmoor
          last edited by

          @michmoor Hello, the rule in pfsense is automatically created when you do the openvpn wizard. How do I see if it hits the firewall?

          Thank you,

          GertjanG 1 Reply Last reply Reply Quote 0
          • GertjanG
            Gertjan @IrixOS
            last edited by

            @IrixOS

            Here :

            df0ab4cb-3678-48b1-9347-92a0061996b3-image.png

            means : my connection has transferred 2,72 Gbytes - no open states right now.

            No "help me" PM's please. Use the forum, the community will thank you.
            Edit : and where are the logs ??

            I 1 Reply Last reply Reply Quote 0
            • I
              IrixOS @Gertjan
              last edited by IrixOS

              @Gertjan
              Rules.png

              Is this correct?

              Thank you,

              GertjanG I 2 Replies Last reply Reply Quote 0
              • GertjanG
                Gertjan @IrixOS
                last edited by

                @IrixOS

                Yep, looks fine, traffic comes into the OpenVPN interfaces, go to the OpenVPN server.

                @IrixOS said in Cannot connect with RDP via openVPN:

                All RDP settings on the windows servers are OK.

                Like : the server/PC on which RDP runs, accepts connection form the OpenVPN interface - which is not the LAN network ?

                No "help me" PM's please. Use the forum, the community will thank you.
                Edit : and where are the logs ??

                I 1 Reply Last reply Reply Quote 0
                • I
                  IrixOS @Gertjan
                  last edited by IrixOS

                  @Gertjan

                  No there is a default 0 route pointing to the pfsense box, and routes back to the switch. This setup has always worked.
                  I have a VDSL2+ modem bridged with the pfsense. The pfsense box is connected with the cisco L3 switch and that router/switch is connected to a L2 distribution switch which connects to the rest of the access switches.
                  From the inside network I can RDP no problem.

                  Also noticed that I cannot access the pfsense webpage from the openVPN client on the smartphone. This exact setup has worked before you know. Nothing has changed since then. It's bizar.
                  I can ping everything from the openVPN client on the smartphone but RDP does not work. I can hardly believe there is something with the VPN routing itself, I don't know.

                  To my opinion the fact I cannot access the pfsense webpage and cannot RDP makes the VPN connection useless. Such a shame.

                  Any findings would be appreciated.
                  Ask me anything you want to know to acquire a solution,

                  Thank you,

                  1 Reply Last reply Reply Quote 0
                  • I
                    IrixOS @IrixOS
                    last edited by IrixOS

                    @IrixOS
                    41860-howto-L3-intervlanrouting-00.png

                    That is the model setup. The default router representing pfsense.

                    M GertjanG 2 Replies Last reply Reply Quote 0
                    • M
                      marvosa @IrixOS
                      last edited by

                      @IrixOS Post your openvpn config (config.ovpn)

                      Post the rules on your OpenVPN tab

                      Verify your VM's are using your SVI's as the default gateway

                      Are you entering the hostname or the IP in the "Computer" box for RDP?

                      I 3 Replies Last reply Reply Quote 0
                      • M
                        michmoor LAYER 8 Rebel Alliance
                        last edited by

                        Could always provide a traceroute to confirm routing

                        Firewall: NetGate,Palo Alto-VM,Juniper SRX
                        Routing: Juniper, Arista, Cisco
                        Switching: Juniper, Arista, Cisco
                        Wireless: Unifi, Aruba IAP
                        JNCIP,CCNP Enterprise

                        1 Reply Last reply Reply Quote 0
                        • GertjanG
                          Gertjan @IrixOS
                          last edited by

                          @IrixOS

                          Can you post : the startup openvpn log sequence of the OpenVPN server ?
                          and
                          The openvpn log at moment you (try to) connect to the OpenVPN server

                          @IrixOS said in Cannot connect with RDP via openVPN:

                          Nothing has changed since then

                          Things can break over time. Like certificates become expired.

                          No "help me" PM's please. Use the forum, the community will thank you.
                          Edit : and where are the logs ??

                          I 1 Reply Last reply Reply Quote 0
                          • I
                            IrixOS @marvosa
                            last edited by IrixOS

                            This post is deleted!
                            bingo600B 1 Reply Last reply Reply Quote 0
                            • I
                              IrixOS @marvosa
                              last edited by

                              @marvosa Rules.jpg Rules_2.jpg

                              VM's Checked SVI and default gateway, all ok, BTW, I can ping every machine from the openvpn app on the smartphone.

                              Tried both IP and DNS resolution, no connection

                              1 Reply Last reply Reply Quote 0
                              • bingo600B
                                bingo600 @IrixOS
                                last edited by bingo600

                                @IrixOS

                                Are you having an MTU issue ??

                                Maybe try this

                                fragment 1400
                                mssfix 1400
                                

                                https://forum.netgate.com/topic/182605/solved-firewall-wan-blocking-packets-destined-for-a-working-openvpn

                                Remember to do it on both ends

                                /Bingo

                                If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

                                pfSense+ 23.05.1 (ZFS)

                                QOTOM-Q355G4 Quad Lan.
                                CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
                                LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

                                I 2 Replies Last reply Reply Quote 0
                                • I
                                  IrixOS @Gertjan
                                  last edited by

                                  @Gertjan

                                  Sep 5 16:03:01 openvpn 27362 94.109.209.23:2845 peer info: IV_VER=3.git::081bfebe:RelWithDebInfo
                                  Sep 5 16:03:01 openvpn 27362 94.109.209.23:2845 peer info: IV_PLAT=android
                                  Sep 5 16:03:01 openvpn 27362 94.109.209.23:2845 peer info: IV_NCP=2
                                  Sep 5 16:03:01 openvpn 27362 94.109.209.23:2845 peer info: IV_TCPNL=1
                                  Sep 5 16:03:01 openvpn 27362 94.109.209.23:2845 peer info: IV_PROTO=30
                                  Sep 5 16:03:01 openvpn 27362 94.109.209.23:2845 peer info: IV_CIPHERS=AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305:AES-128-CBC
                                  Sep 5 16:03:01 openvpn 27362 94.109.209.23:2845 peer info: IV_LZO_STUB=1
                                  Sep 5 16:03:01 openvpn 27362 94.109.209.23:2845 peer info: IV_COMP_STUB=1
                                  Sep 5 16:03:01 openvpn 27362 94.109.209.23:2845 peer info: IV_COMP_STUBv2=1
                                  Sep 5 16:03:01 openvpn 27362 94.109.209.23:2845 peer info: IV_GUI_VER=net.openvpn.connect.android_3.3.4-9290
                                  Sep 5 16:03:01 openvpn 27362 94.109.209.23:2845 peer info: IV_SSO=webauth,openurl,crtext
                                  Sep 5 16:03:01 openvpn user 'kurkunv' authenticated
                                  Sep 5 16:03:01 openvpn 27362 94.109.209.23:2845 WARNING: 'link-mtu' is used inconsistently, local='link-mtu 1558', remote='link-mtu 1559'
                                  Sep 5 16:03:01 openvpn 27362 94.109.209.23:2845 [kurkunv] Peer Connection Initiated with [AF_INET]94.109.209.23:2845
                                  Sep 5 16:03:01 openvpn 27362 kurkunv/94.109.209.23:2845 MULTI_sva: pool returned IPv4=172.16.1.2, IPv6=(Not enabled)

                                  1 Reply Last reply Reply Quote 0
                                  • I
                                    IrixOS @marvosa
                                    last edited by johnpoz

                                    @marvosa

                                    persist-tun
                                    persist-key
                                    cipher AES-128-CBC
                                    ncp-ciphers AES-256-GCM:AES-128-GCM
                                    auth SHA1
                                    tls-client
                                    client
                                    remote rshafw000000001.ddns.net 1194 udp
                                    verify-x509-name "www.rsha.de" name
                                    auth-user-pass
                                    remote-cert-tls server
                                    compress lz4-v2

                                    <ca>
                                    -----BEGIN CERTIFICATE-----
                                    MIIEZTCCA02gAwIBAgIBADANBgkqhkiG9w0BAQsFADB/MQswCQYDVQQGEwJCRTEQ
                                    MA4GA1UECBMHQW50d2VycDEPMA0GA1UEBxMGRHVmZmVsMQ0wCwYDVQQKEwRSU0hB
                                    MSgwJgYJKoZIhvcNAQkBFhl2b2xrYW4ua3Vya3VuQGhvdG1haWwuY29tMRQwEgYD
                                    VQQDEwtpbnRlcm5hbC1jYTAeFw0xODA3MDExNzQ4MDlaFw0yODA2MjgxNzQ4MDla
                                    MH8xCzAJBgNVBAYTAkJFMRAwDgYDVQQIEwdBbnR3ZXJwMQ8wDQYDVQQHEwZEdWZm
                                    <snipped by mod>
                                    aJjpXervXoYbqjMwiSOaaUcFgMqBngV120WYlmrhes7DdLGImFePGGMKC9VE7krZ
                                    vGAiZe+nPEVjFoJTypc6+6NX12o4cfq3qg==
                                    -----END CERTIFICATE-----
                                    </ca>
                                    <cert>
                                    -----BEGIN CERTIFICATE-----
                                    MIIEvDCCA6SgAwIBAgIBAjANBgkqhkiG9w0BAQsFADB/MQswCQYDVQQGEwJCRTEQ
                                    MA4GA1UECBMHQW50d2VycDEPMA0GA1UEBxMGRHVmZmVsMQ0wCwYDVQQKEwRSU0hB
                                    MSgwJgYJKoZIhvcNAQkBFhl2b2xrYW4ua3Vya3VuQGhvdG1haWwuY29tMRQwEgYD
                                    VQQDEwtpbnRlcm5hbC1jYTAeFw0xODA3MDExNzQ5MzhaFw0yODA2MjgxNzQ5Mzha
                                    MHsxCzAJBgNVBAYTAkJFMRAwDgYDVQQIEwdBbnR3ZXJwMQ8wDQYDVQQHEwZEdWZm
                                    ZWwxDTALBgNVBAoTBFJTSEExKDAmBgkqhkiG9w0BCQEWGXZvbGthbi5rdXJrdW5A
                                    <snipped by mod>
                                    jMS6LIf0YDcHlXxGff/chxVkidbKQoa8gMd0qf0UhtF3Qd4qHKK8rPjBF8cptckB
                                    3WQTokQXuKTvtsWe+HFt9pdSqLOSs58jSEB+ZZfoMU7kScnFXJ1pgW1M7cHIVBqG
                                    L1VCkJEcTKHvbGKNIlsHa/S/VoEME0EGn7MCh1F/hvK4hc80MxzU7p6MBBN+Z8Zm
                                    4UNT4g6aTjsMYp5XzywdWMXBw5tuSx8lc9qhIPQf6+5B5sekC1WZPPOlAT2P1BF8
                                    gZBKUNdYPGt+3vrChjaLY2pfrSxgk6N3w24T4OIUx6qwwH/5GgzDFhynww2uSa+V
                                    eblidbXb9sAXqAJweCNNUg==
                                    -----END CERTIFICATE-----
                                    </cert>
                                    <key>
                                    -----BEGIN PRIVATE KEY-----
                                    MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC8tPHojOuy6ZHb
                                    Y3KfN1Gh0bmHUa8qZxLO9UzcJBhq4Mr1Ml8UFSRNCZ2MszXLU9YGaDiA9RBFDRx/
                                    HjYKKhfxFX2QrYdT61LFBpBUDkorTuuYJ1bPgDsV3IHbcOiE5Nk8vAqT8KAAh+vS
                                    tgAO6RLH3Ncp15+nYmSrkeQECzAF3aOT9T8r1bqxSHFUojJKjPoQeZ62dIWD9Mxs
                                    <snipped by mod>
                                    tetslkmM3VGBiDsK8j5dfBQcPHc4Rt2kUFLjRQHmmiQDUuTGywuldkQ7Pw8Rl/xd
                                    1IEp1x7ZLY1d4o68YPvYYL0m/u7/o4w28UP27v69mTtgnV5wGDnPofsoNQKBgFG1
                                    7e7ULd3+XeZZMqzqL3caXtq7f3P725CXCauEeMpgxJBei77oFhb8tHdg62enxh6N
                                    WsQj6DZmHOqtBhx+M26ud4VrJSpKZ+UrsVQ3R629ryv+Xu75CudrB2VIMM39Gp+r
                                    zPrfOAk/VC/GZoStBj8SZEynVHPeAq/pdBknlUx1AoGAbxsocW68vmTVy/pHJdA6
                                    MQxQKyp4rAARVTMRyhYZhaNcaie/Qmb2vdbrqIDJfCFlIICoqThi1j5zjFt1HvBk
                                    x/Dprv6UspaoFWOGhicwGY0tRcx7lkGsehbVmgoynOkwlyQVMfPcu5C4ecXTnAVH
                                    V7yNsaepx91mwVZRhL6qaJk=
                                    -----END PRIVATE KEY-----
                                    </key>
                                    <tls-auth>

                                    2048 bit OpenVPN static key

                                    -----BEGIN OpenVPN Static key V1-----
                                    dd18a2ffe3bd789cd0f4287bde6a90ba
                                    cfe34ea65521461d69582f82f9d30c59
                                    c3fed75174b1bcf2fca5636854f9a896
                                    <snipped by mod>
                                    ab1ef19de29738094360a33e2fa9ed2e
                                    9591ac77b0dc611ddd7a3ce9a5219dad
                                    7fecdef9c325b80c3902820057d734ac
                                    552493644a44c8719a85d26e35845ec1
                                    c3e0e04b4365e7c47d5e757ed69d16a3
                                    -----END OpenVPN Static key V1-----
                                    </tls-auth>
                                    key-direction 1

                                    johnpozJ JonathanLeeJ 3 Replies Last reply Reply Quote 0
                                    • I
                                      IrixOS @bingo600
                                      last edited by IrixOS

                                      @bingo600

                                      This is the log, how doe you change the MTU, I found a field on the WAN if tab, you said both ends, I will try to find the setting in openVPN client.

                                      Sep 5 16:03:01 openvpn 27362 94.109.209.23:2845 peer info: IV_VER=3.git::081bfebe:RelWithDebInfo
                                      Sep 5 16:03:01 openvpn 27362 94.109.209.23:2845 peer info: IV_PLAT=android
                                      Sep 5 16:03:01 openvpn 27362 94.109.209.23:2845 peer info: IV_NCP=2
                                      Sep 5 16:03:01 openvpn 27362 94.109.209.23:2845 peer info: IV_TCPNL=1
                                      Sep 5 16:03:01 openvpn 27362 94.109.209.23:2845 peer info: IV_PROTO=30
                                      Sep 5 16:03:01 openvpn 27362 94.109.209.23:2845 peer info: IV_CIPHERS=AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305:AES-128-CBC
                                      Sep 5 16:03:01 openvpn 27362 94.109.209.23:2845 peer info: IV_LZO_STUB=1
                                      Sep 5 16:03:01 openvpn 27362 94.109.209.23:2845 peer info: IV_COMP_STUB=1
                                      Sep 5 16:03:01 openvpn 27362 94.109.209.23:2845 peer info: IV_COMP_STUBv2=1
                                      Sep 5 16:03:01 openvpn 27362 94.109.209.23:2845 peer info: IV_GUI_VER=net.openvpn.connect.android_3.3.4-9290
                                      Sep 5 16:03:01 openvpn 27362 94.109.209.23:2845 peer info: IV_SSO=webauth,openurl,crtext
                                      Sep 5 16:03:01 openvpn user 'kurkunv' authenticated
                                      Sep 5 16:03:01 openvpn 27362 94.109.209.23:2845 WARNING: 'link-mtu' is used inconsistently, local='link-mtu 1558', remote='link-mtu 1559'
                                      Sep 5 16:03:01 openvpn 27362 94.109.209.23:2845 [kurkunv] Peer Connection Initiated with [AF_INET]94.109.209.23:2845
                                      Sep 5 16:03:01 openvpn 27362 kurkunv/94.109.209.23:2845 MULTI_sva: pool returned IPv4=172.16.1.2, IPv6=(Not enabled)

                                      bingo600B 1 Reply Last reply Reply Quote 0
                                      • bingo600B
                                        bingo600 @IrixOS
                                        last edited by bingo600

                                        @IrixOS

                                        You set it in the openvpn client + server config windows - Advanced configurations window

                                        See here for an example:
                                        https://forum.netgate.com/topic/182605/solved-firewall-wan-blocking-packets-destined-for-a-working-openvpn

                                        Do it on the "remote first" , then the local .....

                                        Aaaannnd it's always good to have https access to the box, if accessing/managing it via openvpn.

                                        Edit: Looks like your listed client above is "Android" ....
                                        If you used Client export , you can add the options there too , to be exported.

                                        63ca692e-94e2-475b-ae8d-51bb671166c4-image.png

                                        If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

                                        pfSense+ 23.05.1 (ZFS)

                                        QOTOM-Q355G4 Quad Lan.
                                        CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
                                        LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

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

                                          @IrixOS I snipped out some of that info - that is dangerous to post your full certs/keys on public forum..

                                          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 2
                                          • I
                                            IrixOS @bingo600
                                            last edited by

                                            @bingo600

                                            That didn't work.

                                            Thank you,

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