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

Public IP through WAN interface

Scheduled Pinned Locked Moved Firewalling
public ip wan p
13 Posts 3 Posters 1.9k Views 3 Watching
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
    sasa1
    last edited by Jan 23, 2020, 1:48 PM

    Hi,
    I have a problem with a public ip that I can't configure on the pfsense firewall, I try to better explain my question.
    On pfsense I have this configuration:
    Public IP interface wan: 1.2.3.4 with gateway 1.2.3.1
    Private IP interface lan: 192.168.1.1

    then I have another public ip address:
    1.2.3.5
    which I configured it on the WAN public interface as "Virtual IP --> Type: IP Alias"

    On the PC where the IP is configured:
    1.2.3.5
    if I use it as a gateway:
    1.2.3.1
    the PC goes on the Internet but the traffic does not pass through the pfsense firewall and therefore the PC is not protected by pfsense.
    If this PC configured as a gateway:
    1.2.3.4
    the pc does not go on the Internet.
    How can I go about passing this PC's traffic through pfsense and thus protecting this PC?
    Thanks.

    1 Reply Last reply Reply Quote 0
    • J Offline
      johnpoz LAYER 8 Global Moderator
      last edited by johnpoz Jan 23, 2020, 1:58 PM Jan 23, 2020, 1:53 PM

      Huh??? Read this like 3 times... And all I get out it is What??

      On the PC where the IP is configured:
      1.2.3.5

      Thought you set that as a vip on pfsense? How would a pc also have this IP?

      If this PC configured as a gateway:
      1.2.3.4

      Again huh... Thought this was pfsense wan IP..

      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 25.07 | Lab VMs 2.8, 25.07

      1 Reply Last reply Reply Quote 0
      • S Offline
        sasa1
        last edited by Jan 23, 2020, 2:02 PM

        Hi,
        No, I haven't configured the IP:
        1.2.3.5
        as a vip on pfsense.
        This IP is configured on a PC that I would like to protect in pfsense.

        The IP address:
        1.2.3.4
        is the public IP assigned to the WAN interface.
        Thanks.

        C 1 Reply Last reply Jan 23, 2020, 2:59 PM Reply Quote 0
        • S Offline
          sasa1
          last edited by sasa1 Jan 23, 2020, 2:15 PM Jan 23, 2020, 2:08 PM

          sorry he misunderstood your question.
          Yes I configured the IP:
          1.2.3.5
          as a VIP address on the WAN interface.

          vip.PNG I configured it on the WAN public interface as "Virtual IP --> Type: IP Alias"
          Thanks.

          1 Reply Last reply Reply Quote 0
          • J Offline
            johnpoz LAYER 8 Global Moderator
            last edited by johnpoz Jan 23, 2020, 2:19 PM Jan 23, 2020, 2:17 PM

            Your info makes no sense... Draw up what your taking about...

            You stated you 2 IPs on pfsense wan, its IP 1.2.3.4, and then vip 1.2.3.5

            After that I have no idea what your going on about, because you then state same IP on some pc??

            On pfsense I have this configuration:
            Public IP interface wan: 1.2.3.4 with gateway 1.2.3.1

            then I have another public ip address:
            1.2.3.5
            which I configured it on the WAN public interface as "Virtual IP --> Type: IP Alias"

            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 25.07 | Lab VMs 2.8, 25.07

            1 Reply Last reply Reply Quote 0
            • S Offline
              sasa1
              last edited by Jan 23, 2020, 2:56 PM

              sorry if I haven't clearly expressed my configuration, now I'll try again ..
              on pfsense i have the wan interface that has public ip:
              1.2.3.4
              with gateway:
              1.2.3.1

              then on a PC (which is behind pfsense) I have the public IP:
              1.2.3.5
              and i would like to pass traffic through pfsense, so i would like to protect this pc through pfsense.
              If I configure on this PC the gateway IP:
              1.2.3.1
              the PC goes on the Internet but the traffic doesn't go through pfsense.
              If on this PC I configure as a gateway:
              1.2.3.4
              the PC does not go to Internet.

              How can I go about achieving my goal?
              thank you.

              1 Reply Last reply Reply Quote 0
              • C Offline
                chpalmer @sasa1
                last edited by Jan 23, 2020, 2:59 PM

                @sasa1 said in Public IP through WAN interface:

                This IP is configured on a PC that I would like to protect in pfsense.

                You need to give this PC a local LAN address and use port forwarding or 1:1 NAT in order to use your VIP address.

                Segregation of any publicly available PC to another LAN subnet firewalled off from accessing your primary LAN is also highly recommended. But that is the topic of another thread.

                Triggering snowflakes one by one..
                Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz on an M400 WG box.

                S 1 Reply Last reply Jan 23, 2020, 3:07 PM Reply Quote 0
                • S Offline
                  sasa1 @chpalmer
                  last edited by Jan 23, 2020, 3:07 PM

                  @chpalmer said in Public IP through WAN interface:

                  @sasa1 said in Public IP through WAN interface:

                  This IP is configured on a PC that I would like to protect in pfsense.

                  You need to give this PC a local LAN address and use port forwarding or 1:1 NAT in order to use your VIP address.

                  on the PC I would like to use the public IP and not the private IP,
                  is this possible?

                  1 Reply Last reply Reply Quote 0
                  • J Offline
                    johnpoz LAYER 8 Global Moderator
                    last edited by Jan 23, 2020, 3:41 PM

                    You can do a 1:1 nat to the public VIP.. To the internet your machine will be the public IP, on the local network it will be the rfc1918 address.

                    If you want it to be directly connected to the public network... Then put it on the public network directly, or do a transparent firewall setup...

                    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 25.07 | Lab VMs 2.8, 25.07

                    S 1 Reply Last reply Jan 23, 2020, 3:55 PM Reply Quote 0
                    • S Offline
                      sasa1 @johnpoz
                      last edited by Jan 23, 2020, 3:55 PM

                      @johnpoz said in Public IP through WAN interface:

                      You can do a 1:1 nat to the public VIP.. To the internet your machine will be the public IP, on the local network it will be the rfc1918 address.

                      with this solution on the pc I should change the public IP to a private IP, is that so ?

                      If you want it to be directly connected to the public network... Then put it on the public network directly, or do a transparent firewall setup...
                      if I use this solution, however, can I not protect the PC by enabling only traffic on specific tcp/udp ports ?

                      Thanks.

                      1 Reply Last reply Reply Quote 0
                      • J Offline
                        johnpoz LAYER 8 Global Moderator
                        last edited by johnpoz Jan 23, 2020, 4:05 PM Jan 23, 2020, 4:04 PM

                        Yes the pc would be on whatever lan network you have setup on pfsense, some rfc1918 space... Then create port forwards for what traffic you want to go to this PC, or sure do a full 1:1 - but better to just forward the actual ports you want/need.

                        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 25.07 | Lab VMs 2.8, 25.07

                        1 Reply Last reply Reply Quote 0
                        • S Offline
                          sasa1
                          last edited by Jan 23, 2020, 4:14 PM

                          however in all cases the "Virtual IP" must be of the "IP Alias" type, is that so?
                          Thanks.

                          1 Reply Last reply Reply Quote 0
                          • J Offline
                            johnpoz LAYER 8 Global Moderator
                            last edited by johnpoz Jan 23, 2020, 4:29 PM Jan 23, 2020, 4:28 PM

                            I have no where close to the amount of into about what your trying to do... I suggest you consult

                            https://docs.netgate.com/pfsense/en/latest/firewall/virtual-ip-address-feature-comparison.html

                            But yes normally that type is what you would use.

                            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 25.07 | Lab VMs 2.8, 25.07

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