Routing /27 public IPs
-
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.
-
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.
-
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?
-
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