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

    Need Reflection/Rule for IP Camera/ffmpeg - pfSense 2.1

    Scheduled Pinned Locked Moved NAT
    6 Posts 2 Posters 3.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.
    • N
      nlitend1
      last edited by

      I am trying to run a ffmpeg batch file on my local network and I need to use an external IP address in the input file (rtsp://) and have it redirect to the IP camera on the same local network. I have done some research and have set NAT Reflection mode for port forwards to Enable + Proxy, but that does not work.

      In summary i believe i need a rule to forward "externalIP:port to cameraIP:port and i need this to function from within the network. Any advice greatly appreciated! Will "rep" for suggestions…Thank you!

      nlitend1

      p.s. I also have a local domain on the network with a domain controller (Windows Server 2012) if that provides a DNS forwarding option.

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

        "I need to use an external IP address in the input file (rtsp://)"

        I have to wonder why?  And do you mean you have to use something like rtsp://24.1.2.3 or something like rtsp://something.otherthing.tld ?

        Why can you not use rtsp://192.168.1.14 in your batch file?  And point directly to your camera's actual local IP?  If needing to use something.otherthing.tld then have your local dns be it pfsense or your AD dns resolve something.otherthing.tld to whatever your local camera's IP is - ie 192.168.1.14 for example.

        But if you want nat reflection to work, then first you have to actually forward the port..  So whatever port this rtsp:// url uses you need to forward that first.  And then yes make sure nat reflection is enabled and then you can hit rtsp://yourpfsensewanIP be it by fqdn or IP and it would be reflected back to whatever local IP you setup your port forward for.

        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
        • N
          nlitend1
          last edited by

          Thanks for the reply!

          To answer the "why"….The foscam IP camera I have drops frames over UDP, and if i use an external IP to request the stream, the card will timeout UDP and switch over to TCP, which should work better per the foscam forums.

          I have:
          1. forwarded the port to the camera
          2. set nat reflection to Enabled + proxy
          3. (even tried change the "reflection" setting in the port forwarding from "system default" to "enabled + proxy")

          And currently the ip camera is not accessible via FQDN:port or ExtIP:port.

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

            so your saying your camera is going to drop packets over your LOCAL lan??  Sure I can see that happening over the public net, but locally why should you be dropping packets?

            As to why you would use + proxy I have no idea - purenat would be normal choice.  And also enable automatic outbound nat checkbox.

            What is your port forward setup udp or tcp?  I would assume tcp?  UDP an nat reflection have some issues I believe.

            So your saying in your software you use to access this camera you have no way of saying use udp or tcp?  It just auto tries udp, and then if that doesn't work it tries tcp?  And you feel udp or have already tested that udp does not work on your local lan, and you want to try this nat reflection trick to get it to use tcp?

            edit:
            what camera do you have exactly??  A quick look of foscam shows that they stream over HTTP - so that is NOT going to be UDP..  On their website they show changing the port to 8090 vs the default 80..  Make sure your not trying to use the port your pfsense gui is listening on.

            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
            • N
              nlitend1
              last edited by

              The camera is a Foscam FI9821W v2.

              See the following link for why I would like to use TCP.

              http://foscam.us/forum/free-tools-that-work-with-all-foscam-camera-models-t7258.html#p34621

              Additionally, here is the thread where I discussed specifically my situation.

              http://foscam.us/forum/h-264-tools-t8146-10.html

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

                Ok so what ports are you trying to use for http and this media port.. On the website they show using 8080 for the http and 888 for the media port.

                This would be the port I assume the rstp:// uses..  Have you forwarded this port as well for tcp and enabled nat reflection?

                What is not working do you not get the web page of the camera to login?  What is not working exactly.. And can you post up your nat rules and firewall rules.

                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
                • First post
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.