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

    Routing /27 public IPs

    Scheduled Pinned Locked Moved Routing and Multi WAN
    4 Posts 2 Posters 946 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.
    • K Offline
      kungpow
      last edited by

      Hi

      I know similar questions have been asked, and I've read a lot of information about this, but still can't seem to wrap my head around this.

      Say I have the following /24 block:

      40.180.136.0/24

      It is currently in use on a few servers, that use the following configuration:

      40.180.136.34, netmask 255.255.255.0, gateway 40.180.136.254 (my providers).

      I want to take a /27 subnet out of this range and put it behind pfSense for some other servers on VLAN 40:

      40.180.136.64/27

      I setup pfSense with a WAN interface on a completely different public IP I have routed (80.180.123.34 gw 80.180.123.254 netmask 255.255.255.0), LAN interface on 192.168.1.1 for administration and a LAN interface on VLAN 40 with IP 40.180.136.65 netmask 255.255.255.192.

      Adding firewall rules to allow trafic, I setup the servers as such:
      server 1: 40.180.136.66 netmask 255.255.255.192, gateway 40.180.136.65
      server 2: 40.180.136.67 netmask 255.255.255.192, gateway 40.180.136.65
      and so on.

      However, this doesn't work. Am I taking the wrong approach here? Should I be looking at Virtual IPs instead?

      The solution I'm looking for does not involve NAT nor DHCP.

      Hope this makes sense.

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

        Here is the thing.. Since your gateway is in the same netblock sounds like the network is routed to your ISP.  They then have a leg of this network in your /24 – this netblock is not actually routed to you.

        So if you want to put IPs in this netblock behind pfsense you would normally just create pfsense WAN ips in this network, be it via actual interfaces with the IPs on them or VIPs.

        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.1 | Lab VMs 2.8.1, 25.07.1

        1 Reply Last reply Reply Quote 0
        • K Offline
          kungpow
          last edited by

          Thank you. I think I finally got it. So I'll need the ISP to route that specific 40.180.136.0/24 to my pfSense box's IP 80.180.123.34) whereafter I can subnet into as many /27 or what not I want… right?

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

            yup if they route that segment to your other IP, then you could put whatever you want behind it broken up how ever you want to break it up

            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.1 | Lab VMs 2.8.1, 25.07.1

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