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

    Multiple DHCP IP addresses on one interface

    DHCP and DNS
    4
    14
    3.7k
    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
      stijnrosaer
      last edited by

      My ISP offers multiple public IP addresses to use over DHCP. Is there any way of setting up two addresses on my wan port? It would be used to give a server on the wan side an direct public IP
      Thanx

      R 1 Reply Last reply Reply Quote 0
      • R
        renat_kaa @stijnrosaer
        last edited by renat_kaa

        @stijnrosaer yep!
        If static - Firewall -> Virtual IPs
        If DHCP - Switch + VLANs

        JKnottJ 1 Reply Last reply Reply Quote 0
        • JKnottJ
          JKnott
          last edited by

          How could that work? DHCP servers assign an IP address to a MAC address. The server will not assign multiple IP addresses to a single MAC. The best you could do is manually create an alias IP address.

          PfSense running on Qotom mini PC
          i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
          UniFi AC-Lite access point

          I haven't lost my mind. It's around here...somewhere...

          1 Reply Last reply Reply Quote 0
          • S
            stijnrosaer
            last edited by

            Thank you for the information.
            Is there a way of giving my local server a public IP? I know the mac address of it. The server is attached through the LAN interface.

            R JKnottJ 2 Replies Last reply Reply Quote 0
            • JKnottJ
              JKnott @renat_kaa
              last edited by

              @Renat said in Multiple DHCP IP addresses on one interface:

              If DHCP - Switch + VLANs

              Does the WAN interface have a VLAN? Does the ISP support it? Otherwise, no go.

              I already covered the static address when I mentioned an alias which is what a virtual IP is.

              PfSense running on Qotom mini PC
              i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
              UniFi AC-Lite access point

              I haven't lost my mind. It's around here...somewhere...

              R 1 Reply Last reply Reply Quote 0
              • R
                renat_kaa @stijnrosaer
                last edited by

                @stijnrosaer you can use reverse proxy (e.g. HAProxy package)

                1 Reply Last reply Reply Quote 0
                • JKnottJ
                  JKnott @stijnrosaer
                  last edited by

                  @stijnrosaer said in Multiple DHCP IP addresses on one interface:

                  Is there a way of giving my local server a public IP? I know the mac address of it. The server is attached through the LAN interface.

                  Assuming you have NAT, then just port forward to the server. It's common practice.

                  PfSense running on Qotom mini PC
                  i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                  UniFi AC-Lite access point

                  I haven't lost my mind. It's around here...somewhere...

                  S 1 Reply Last reply Reply Quote 1
                  • R
                    renat_kaa @JKnott
                    last edited by renat_kaa

                    @JKnott said in Multiple DHCP IP addresses on one interface:

                    @Renat said in Multiple DHCP IP addresses on one interface:

                    If DHCP - Switch + VLANs

                    Does the WAN interface have a VLAN? Does the ISP support it? Otherwise, no go.

                    I already covered the static address when I mentioned an alias which is what a virtual IP is.

                    Hmm... You can create VLAN on any interface, even WAN. But VLANs have the same MAC address. I guess you cannot use it with one ISP and one DHCP server.

                    1 Reply Last reply Reply Quote 0
                    • S
                      stijnrosaer @JKnott
                      last edited by

                      @JKnott That is not a good solution for my problem. I am actually trying to get an TV decoder to get a public IP. This is the issue:

                      The decoder has two mac addresses. One should be an internal address, BUT the other is actually an 10.201.. address. This second one is given by the ISP's DHCP server and is used to verify my TV subscription as well as extra packages like sport or playback.

                      JKnottJ 1 Reply Last reply Reply Quote 0
                      • R
                        renat_kaa
                        last edited by

                        @stijnrosaer it is better if you create different topics with different items.

                        S 1 Reply Last reply Reply Quote 0
                        • S
                          stijnrosaer @renat_kaa
                          last edited by

                          @Renat Thank you. I will. This is the post
                          https://forum.netgate.com/topic/145145/public-ip-for-device-on-lan

                          1 Reply Last reply Reply Quote 0
                          • R
                            renat_kaa
                            last edited by

                            @stijnrosaer according to multiple DHCP IP addresses you should use different physical (virtual) interfaces.

                            1 Reply Last reply Reply Quote 0
                            • JKnottJ
                              JKnott @stijnrosaer
                              last edited by

                              @stijnrosaer said in Multiple DHCP IP addresses on one interface:

                              That is not a good solution for my problem. I am actually trying to get an TV decoder to get a public IP.

                              You cannot have a public IP on any LAN, NAT or NOT, where it doesn't belong. It would not be able to communicate with anything.

                              PfSense running on Qotom mini PC
                              i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                              UniFi AC-Lite access point

                              I haven't lost my mind. It's around here...somewhere...

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

                                If you want multiple public IPs via dhcp for wan on pfsense.. Then use another physical interface, and put a switch between your isp device and pfsense. Now you have multiple wans, with different IPs.

                                You could then do port forwards for 1 IP to server IP behind, or even 1:1 nat, etc.

                                Can really do it with just vlan on 1 physical nic in pfsense, because it will use the same mac.

                                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.7.2, 24.11

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