OPNsense Forum
English Forums => General Discussion => Topic started by: oneplane on October 03, 2021, 05:39:08 pm
-
I'm trying to setup a routed subnet that is routed towards my WAN IPv4 to be used for multiple purposes. This is a relatively small subnet, a /29, and I'd like to:
- Have 2 addresses used for 2 LAN networks, they would have their own outbound NAT each
- Have 2 more used for 2 separate networks that run their own firewall on their own public IP
The problem is that with such a small subnet you can't really split it off into multiple subnets and have a public interface consuming 4 addresses (well, 2 addresses one network address and one broadcast address).
One "solution" might be a /31, but that would still waste addresses. Maybe a PPPoE connection would make it possible to use a private IPv4 on the OpnSense side and supply one of the routed IPs on the external firewall side?
Drawing to go with this story:
┌────────────────┐
│ │
│ incoming fiber │
│ │
└────────┬───────┘
│
│
│
│
│
│
OPNsense │
│
┌───────────────────────────────────────┬────────────┐ │
│ │ │ WAN │
│ ┌───────────────────────────────┤ │ │
│ │ │ igb0 ◄─────────────────┘
│ │ │ │
│ │ │ │ ┌───────────────────────────────┐
│ │ ┌─────────────────┼────────────┤ │ │
│ │ │ │ │ │ A subnet with DHCP, NAT etc │
│ │ │ NAT │ ├────────────────────────► │
│ ├─────────────► │ igb1 │ │ │
│ │ │ │ │ └───────────────────────────────┘
│ │ ├─────────────────┼────────────┤
│ │ │ │ │
│ │ │ │ │ ┌───────────────────────────────┐
│ ├─────────────► NAT │ igb2 │ │ │
│ │ │ │ ├────────────────────────► │
│ │ │ │ │ │ A subnet with DHCP, NAT etc │
│ │ └─────────────────┼────────────┤ │ │
│ │ │ │ └───────────────────────────────┘
│ │ one of the routed IPs │ igb3 │
│ ├───────────────────────────────► ├─────────────────┐ ┌────────────────────────┐
│ │ │ │ │ │ │
│ │ ├────────────┤ └────────► external firewall │
│ │ │ │ │ │
│ │ one of the routed IPs │ │ └────────────────────────┘
│ └───────────────────────────────► igb4 │
│ │ ├──────────────┐ ┌────────────────────────┐
│ │ │ │ │ │
│ ├────────────┤ └───────────► external firewall │
│ │ │ │ │
│ │ │ └────────────────────────┘
│ │ │
│ (spare)────────────────┤ igb5 │
│ │ │
│ │ │
└───────────────────────────────────────┴────────────┘