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

WAN access to IP camera fails with pfSense

Scheduled Pinned Locked Moved General pfSense Questions
19 Posts 7 Posters 8.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.
  • S
    SOE LINN HTIKE
    last edited by Sep 25, 2014, 7:27 AM Sep 25, 2014, 5:39 AM

    Hi There,

    I also getting same problem with you. Your problem solved already? If solved, please guide me how to solve it?

    Many Thanks,
    Soe

    1 Reply Last reply Reply Quote 0
    • E
      eiger3970
      last edited by Oct 27, 2014, 2:44 AM

      Well, fixed last week after port forwarding correctly, then using the command $ ssh user@publicWANIP -p portNumber.
      However this week, the same commands fail and I receive the error:
      ssh: Could not resolve hostname publicWANIP: nodename nor servname provided, or not known.

      Any suggestions please?

      1 Reply Last reply Reply Quote 0
      • D
        Derelict LAYER 8 Netgate
        last edited by Oct 27, 2014, 3:02 AM

        What are you really typing?  If a "hostname" matches the proper format of an IP address, name resolution isn't done.

        Not sure if forward (A record) and reverse (corresponding PTR record) have to match.

        If you have really set up a host called "publicWANIP" then you need to look at your DNS infrastructure and figure out why it's now failing to resolve.

        Chattanooga, Tennessee, USA
        A comprehensive network diagram is worth 10,000 words and 15 conference calls.
        DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
        Do Not Chat For Help! NO_WAN_EGRESS(TM)

        1 Reply Last reply Reply Quote 0
        • E
          eiger3970
          last edited by Oct 27, 2014, 3:07 AM

          Hello, when I type publicWANIP, I mean an IP address like 60.225.230.2.
          E.g. In Terminal > $ ssh root@60.225.230.2 -p 8063 > Enter.
          I don't think A record or DNS has anything to do with this…this is not for a webserver.

          1 Reply Last reply Reply Quote 0
          • D
            Derelict LAYER 8 Netgate
            last edited by Oct 27, 2014, 3:12 AM Oct 27, 2014, 3:09 AM

            ssh: Could not resolve hostname publicWANIP

            That's DNS.  DNS resolves hostnames.

            This should fail in the same way:

            $ ssh root@kjsdksjfhs.sdfsdfsdf.sdfsdfsdf -p 8022
            ssh: Could not resolve hostname kjsdksjfhs.sdfsdfsdf.sdfsdfsdf: nodename nor servname provided, or not known

            And it does.

            Chattanooga, Tennessee, USA
            A comprehensive network diagram is worth 10,000 words and 15 conference calls.
            DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
            Do Not Chat For Help! NO_WAN_EGRESS(TM)

            1 Reply Last reply Reply Quote 0
            • E
              eiger3970
              last edited by Oct 28, 2014, 12:20 AM

              Thanks.
              So, I tested computer1 locally and LAN IP was different.
              Computer2 had correct LAN IP though.

              So today, from a remote computer:
              Remote browser to computer1 error: This webpage is not available.
              Remote browser connects to computer2 and loads page.
              Ssh to computer1 error: Connection refused.
              Ssh to computer2 error: Connection closed by remote host.

              Port forwards seem correct with pfSense port forward to:
              computer1 port 8061 (I didn't change the computer's listening port…perhaps I should, but not sure how to on Ubuntu server 14.04.1 LTS)?
              computer2 port 8063 (I changed the computer's listening port from 80 to 8063).

              1 Reply Last reply Reply Quote 0
              • D
                Derelict LAYER 8 Netgate
                last edited by Oct 28, 2014, 12:46 AM

                I really don't have a good picture regarding what you're trying to do or what's not working exactly.

                Chattanooga, Tennessee, USA
                A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                Do Not Chat For Help! NO_WAN_EGRESS(TM)

                1 Reply Last reply Reply Quote 0
                • E
                  eiger3970
                  last edited by Oct 28, 2014, 2:14 AM

                  This might clarify my possible misunderstanding of how port forwards work and whether I have pfSense and the LAN computers configured correctly?
                  I think I'm missing a step to allow remote access to 3 local computers.

                  pfSense port forward I set computer1IP:portNumber1, computer2IP:portNumber2, computer3IP:portNumber3.
                  Then when I SSH to computer1, I use $ ssh computer1UserName@computer1IP -p computer1PortNumber.
                  The pfSense router then sends any received SSH traffic on port 22 to the relevant port.

                  Do I need to change the port number the LAN computer listens on?
                  That is, port 80 to portXYZ?

                  1 Reply Last reply Reply Quote 0
                  • D
                    Derelict LAYER 8 Netgate
                    last edited by Oct 28, 2014, 2:23 AM

                    Port forwards are usually used to translate an external IP:port to an internal IP:Port.  Say your external IP address (from your ISP that can accept incoming connections from the entire internet) is 74.75.76.77.  You have 3 SSH servers on your LAN all listening for ssh connections on port 22.  Those hosts are 192.168.0.23, 24, and 25.

                    You could set up the following NAT port forwards:

                    74.75.76.77:8022 -> 192.168.0.23:22
                    74.75.76.77:8023 -> 192.168.0.24:22
                    74.75.76.77:8024 -> 192.168.0.25:22

                    Then from outside, to connect to the second host, you would ssh -p 8023 host2user@74.75.76.77

                    Chattanooga, Tennessee, USA
                    A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                    DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                    Do Not Chat For Help! NO_WAN_EGRESS(TM)

                    1 Reply Last reply Reply Quote 0
                    • E
                      eiger3970
                      last edited by Oct 28, 2014, 2:53 AM

                      Thank you for the clarification.
                      I think I have mine correct then.
                      There's no need to change the LAN computer's listening port of 80, which I was confused with.

                      However, having my LAN computer's setup like that, I still receive the errors:
                      Browser:
                      No remote browser access to security server on publicWANIP:8061.
                      Remote browser access to security server on publicWANIP:8063.

                      SSH:
                      $ ssh ubuntu@publicWANIP -p 8061
                      ssh: connect to host publicWANIP port 8061: Connection refused
                      $ ssh ubuntu@publicWANIP -p 8063
                      ssh_exchange_identification: Connection closed by remote host

                      TeamViewer:
                      TeamViewer to 192.168.1.40 blue, but won’t connect.
                      Now TeamViewer to 192.168.1.40 connects, but 192.168.1.120 turned off?
                      TeamViewered into 192.168.1.120, the remote connection turned off.

                      Traffic analyser:
                      Tested packet capture: LAN computer > pfSense > Diagnostics > Packet Capture > Start > remote computer (I'm on this) > Terminal  > $ssh ubuntu@publicWANIP -p portNumber > Enter > LAN computer > pfSense > Stop.
                      No packets reaching the pfSense WAN.

                      I'm now stuck remotely and will need to physically go to the local computers for access, to try again tomorrow.

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