How to set ip range on LAN same as WAN range ip
-
hi. i have a problem with pfsense.
my problem is that i can not set ip address on LAN interface same WAN interface. for example my WAN ip is:
93.115.150.25/28
and my server is 93.115.150.152/28 and my server have public ip. and also my server and my pfsense are on a same network with same gateway.
for connecting my server to my LAN in pfsense i can not set ip in range of WAN and Server.
i want that my server can not connect to internet directly and will can connect to internet only via pfsense. how can i do for this job? -
@pflover said in How to set ip range on LAN same as WAN range ip:
my problem is that i can not set ip address on LAN interface same WAN interface. for example my WAN ip is:
93.115.150.25/28
and my server is 93.115.150.152/28 and my server have public ip.These IP ranges are not overlapping. So there should be no problem to assign one to WAN and the other one to LAN at all.
So not clear, what's your real issue here and what you're trying to achieve.
Possibly you're looking for Bridging? -
@viragomann
i want that my server can not connect to internet directly and will can connect to internet only via pfsense. how can i do for this job? -
@pflover just put your server behind pfsense and you can limit where it can and can not go off its own network, or even the same network if your bridging. As long as the other IPs are on the other side of the bridge than the server.
How you do that is up to you - routed public netblock, natting from public to rfc1918 space or bridge if your isp is going to give you some /29 for example.
Common setup is just to just use rfc1918 space, then either port forward or 1:1 nat for stuff to get to that server via some public IP. This could be a VIP on your wan interface if your isp has given you more than 1 public IP to work with.
-
@pflover
There are two ways. Either you bridge WAN with an internal interface as described in the Bridged docs section mentioned above.
Or in case the public subnet for the server is routed to your WAN IP, you can configure it on an internal interface with its own gateway. See the chapter Routing Public IP Addresses in the docs.In both cases the traffic between Internet and your server has to pass pfSense and you're able to restrict it.
-
Yeah the examples you gave are not conflicting subnets so there's no problem assigning one as WAN and and one as LAN.
Is that not actually the case?Steve
-
@stephenw10
i have pfsense with ip address: 86.25.32.21
and my server is : 86.25.32.23
and gateways of pfsense and server is : 86.25.32.20
i have LAN interface on pfsense that when i trying to set ip 86.25.32.25 i get this error :
IPv4 address 86.25.32.25/32 is being used by or overlaps with: WAN (86.25.32.21/28)i have this problem.
my purpose is my server can not connect to internet directly and only can connect to internet through pfsense.
please help me -
@pflover said in How to set ip range on LAN same as WAN range ip:
i have LAN interface on pfsense that when i trying to set ip 86.25.32.25 i get this error :
IPv4 address 86.25.32.25/32 is being used by or overlaps with: WAN (86.25.32.21/28)That might be true. 86.25.32.25 is part of the WAN network 86.25.32.21/28, so you cannot use this IP on LAN.
The only option to use a public IP out out of the WAN network behind pfSense is bridging the interface as described in the docs.
-
Yup, that^. In that situation you can only use bridged interfaces.
-
Bridging is not the only way - he could just nat it and use a vip for whatever public IP he wants to use and either port forward the specific ports he needs or 1:1 nat
Which would be far easier and less complex setup than a bridge - and less likely for a security screw up if using port forwards.
-
Yup that's true if the server doesn't require a public IP directly.
I'd thought it did but reading back now it's not clear. -
@stephenw10 said in How to set ip range on LAN same as WAN range ip:
server doesn't require a public IP directly.
It would be a very odd scenario where it HAD to be public.. Like some license hard locked to having to see public IP? I really can not think of a scenario that it wouldn't be better to just nat..
Unless there is a specific reason that public IP on the device is required - which can not think of.. Something needed with L2 from the isp maybe? Doubtful.
-
Unfortunately it's something we see quite often. Some server/application that will only use it's local IP with no way to be configured for an external public IP or detect it automatically.
I agree, it shouldn't ever happen in 2021 but.... -
@stephenw10 You mean like a ftp server handing out its IP to connect to via passive?
-
Yup, exactly like that. PBXs are also relatively common. Other more obscure appliances etc.
-
@stephenw10 that is just SAD at so many levels.