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

    Cannot access RTSP over WAN

    Scheduled Pinned Locked Moved General pfSense Questions
    7 Posts 5 Posters 1.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.
    • J
      jcahow
      last edited by

      I have a Hikvision IP camera which I am trying to stream using RTSP by coming through Pfsense 2.7 using my internet domain name.

      I can RTSP stream the IP camera just fine when it is accessed from my internal (10.0.0.237) network. I can also access it just fine from the internet to view the internal web viewer. I cannot seem to access it from the internet when trying to RTSP stream.

      I am using Pfsense 2.7 on my Router and have port forwarded the HTTP port (93) to the appropriate internal address and this allows access to the web viewer.
      I have also port forwarded the RTSP port (567) to the same internal address but this does not seem to allow the RTSP through as I have tried three different iOS streaming apps and none connect.

      Since it streams and views fine on my internal network I know the IP camera and ports number setup are working fine. Since I can view the internal web viewer remotely I know the Pfsense port forwarding and firewall process are working fine (at least for the HTTP port).

      This leads me to think that I am missing something in Pfsense in regards to what I actually need to port forward. Apparently I either have it setup incorrectly in Pfsense or I need to allow something else through Pfsense to view the RTSP stream.

      I have the NAT rule setup in Pfsense on the WAN interface as a TCP/UDP pointing to the camera's internal address and RTSP port number just like I have on the HTTP port rule.

      10.0.0.237:93 Views just fine
      rtsp://10.0.0.237:567/Streaming/channels/101 Streams just fine

      xxxxxx.ddns.net:93 Views just fine (my external domain name port forwarded in Pfsense)
      rtsp://xxxxxx.ddns.net:567/Streaming/channels/101 never connects (my external domain name port forwarded in Pfsense)

      I can ping xxxxxx.ddns.net fine so I know my router is seeing the RTSP request just fine.

      Can anyone tell me if I need to open more ports in Pfsense and what they are or how to configure the RTSP port in Pfsense to allow external streaming?

      E NollipfSenseN pfrickrollP 3 Replies Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        Seems like it requires additional ports. Do you see any blocked traffic from the external client IP in the firewall logs when you try to connect?

        Does the camera have outbound access to open new connections back to the client IP?

        Steve

        1 Reply Last reply Reply Quote 0
        • E
          elvisimprsntr @jcahow
          last edited by

          @jcahow

          Instead of port forwarding unauthenticated cameras, have you considered enabling a VPN in pfSense?

          1 Reply Last reply Reply Quote 1
          • NollipfSenseN
            NollipfSense @jcahow
            last edited by

            @jcahow said in Cannot access RTSP over WAN:

            This leads me to think that I am missing something in Pfsense in regards to what I actually need to port forward. Apparently I either have it setup incorrectly in Pfsense or I need to allow something else through Pfsense to view the RTSP stream.

            It seems that you need a RTSP server. https://antmedia.io/rtsp-explained-what-is-rtsp-how-it-works/
            Does your camera comes with the server? Are you using your browser to view? I got some Hikvision cameras with a Hikvision NVR...you could use the NVR as a server...with IVMS 4200...that's how I view mine http:80.

            pfSense+ 23.09 Lenovo Thinkcentre M93P SFF Quadcore i7 dual Raid-ZFS 128GB-SSD 32GB-RAM PCI-Intel i350-t4 NIC, -Intel QAT 8950.
            pfSense+ 23.09 VM-Proxmox, Dell Precision Xeon-W2155 Nvme 500GB-ZFS 128GB-RAM PCIe-Intel i350-t4, Intel QAT-8950, P-cloud.

            1 Reply Last reply Reply Quote 0
            • pfrickrollP
              pfrickroll @jcahow
              last edited by

              @jcahow What application/software are you using to view RTSP stream? Is port HTTP 93/RTSP 567 configured on the camera, and same ports on pfSense?

              1 Reply Last reply Reply Quote 0
              • stephenw10S
                stephenw10 Netgate Administrator
                last edited by

                Since it works locally the server/service and client must be functional.

                Unless it's proven otherwise I'd bet the camera is trying to open rtp connections back to the client and it being blocked but can do so when the client is local.

                pfrickrollP 1 Reply Last reply Reply Quote 0
                • pfrickrollP
                  pfrickroll @stephenw10
                  last edited by pfrickroll

                  @stephenw10 I work with RTSP streams with various brands all over US. If he port forwarded everything correctly it should work without any problems.

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