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

    How to know the wan ip on my pc on multiwan pfsense.

    Scheduled Pinned Locked Moved General pfSense Questions
    6 Posts 2 Posters 1.2k 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 Offline
      snaker
      last edited by

      Hello,
      i have a multiwan pfsense with 2 wan interfaces and 1 lan.System works fine but i have a question.
      I want to open ports to my pc only from the 1st wan and not from the 2nd wan.(if i wanted that i would forward the same ports on both wans)
      I know how to open ports correctly on pfsense,but the system uses both wan public ips.I think that the choice is completely random.When i type check my ip on google i get completely random the 1st or the 2nd wan public ip.
      How i can make it choose only the 1st wan public ip on my pc without disconnecting the 2nd wan cable.
      Do i need to setup a virtual ip for my modem and do 1:1 nat?Or add a static route?
      Thanks.

      1 Reply Last reply Reply Quote 0
      • F Offline
        firewalluser
        last edited by

        Reverse of a Lan port forward. Computers dont care what we name things, its just an interface.

        https://forum.pfsense.org/index.php?topic=3493.0
        https://forum.pfsense.org/index.php?topic=58621.0

        Read that initially as you wanted to direct traffic out on to the web on a particular wan interface.

        You will have a different IP assigned to each wan interface, these may be fixed or variable depending on your isp and what they have assigned to you as your fixed ip address range.

        Are you using Virtual IP's in pfsense?

        If would help if you could produce more info like wan interface configs and whether you are using vip's or something else because fixed ip address can not oscillate between interfaces, theres needs to be an ip address of sorts assigned to each wan interface.

        What version of pfsense as well?

        Capitalism, currently The World's best Entertainment Control System and YOU cant buy it! But you can buy this, or some of this or some of these

        Asch Conformity, mainly the blind leading the blind.

        1 Reply Last reply Reply Quote 0
        • S Offline
          snaker
          last edited by

          Thanks for the answer.
          Here is my config:

          1st adsl line:
          modem public ip: 37.6. 184 .xxx  lan side 192.168.1.254
          pfsense wan1 ip  192.168.1.1

          2nd adsl line:
          modem public ip 34.245.45.xxx    lan side 192.168.2.254
          pfsense wan2 ip 192.168.2.1

          pfsense lan ip 192.168.3.1

          multiple computers on lan 192.168.3.10- 192.168.3.20

          I have  setup correctly multiwan with loadbalance,failover rules and works fine.
          I want to port forward for exaple port 5000 to 192.168.3.10 only using 1st adsl line.I know how to forward ports at pfsense and i have opened the port correctly.
          But when i try to access the port if my public ip is  37.6. 184 .xxx which is asdl1 line,port is open ,but if my public ip is 34.245.45.xxx which is the second line port is closed.
          I dont want to open port 5000 on 2nd adsl line.I know that with this way it will always work and port will always be open.
          I want the ip 192.168.3.10 to have only 37.6. 184 .xxx as a public ip even if i have a multiwan setup.How can i do that?
          The pfsense i use is 2.2.2
          Hope i cleared things up.
          Thanks.

          1 Reply Last reply Reply Quote 0
          • F Offline
            firewalluser
            last edited by

            So have you tried this?
            https://forum.pfsense.org/index.php?topic=48970.0
            Topic: Port forwarding with multiwan

            Capitalism, currently The World's best Entertainment Control System and YOU cant buy it! But you can buy this, or some of this or some of these

            Asch Conformity, mainly the blind leading the blind.

            1 Reply Last reply Reply Quote 0
            • S Offline
              snaker
              last edited by

              Yeas i have tried this and no luck.
              I think that my post is related to this problem:
              https://forum.pfsense.org/index.php?topic=49054.0
              I have it long time now and i am sure this happens because the sites see the different ip.

              1 Reply Last reply Reply Quote 0
              • F Offline
                firewalluser
                last edited by

                I havent had that problem so to avoid resource burn, I'll let someone else step in if google doesnt throw up anything.

                Capitalism, currently The World's best Entertainment Control System and YOU cant buy it! But you can buy this, or some of this or some of these

                Asch Conformity, mainly the blind leading the blind.

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