Routing /27 public IPs
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:
It is currently in use on a few servers, that use the following configuration:
18.104.22.168, netmask 255.255.255.0, gateway 22.214.171.124 (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:
I setup pfSense with a WAN interface on a completely different public IP I have routed (126.96.36.199 gw 188.8.131.52 netmask 255.255.255.0), LAN interface on 192.168.1.1 for administration and a LAN interface on VLAN 40 with IP 184.108.40.206 netmask 255.255.255.192.
Adding firewall rules to allow trafic, I setup the servers as such:
server 1: 220.127.116.11 netmask 255.255.255.192, gateway 18.104.22.168
server 2: 22.214.171.124 netmask 255.255.255.192, gateway 126.96.36.199
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 188.8.131.52/24 to my pfSense box's IP 184.108.40.206) 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