I tried to get a setup working to make the following scenario work: Access a pc web service hosted in a different IP range/mask than the rest on-site PCs.
Details:
We have a network setup with a local network 192.168.x.0/24 with a local endian firewall acting as gateway with IP 192.168.x.10
and serving DHCP.
Therefore inside the company I can plug in any PC and access any web services hosted there from within the company on any 192.168.x.y
hosting PC.
Now I want to prepare a network change. This will include changing the address ranges to 172.31.0.0/16
.
To prepare this I created a VM (proxmox) hosting OPNsense. Configured with static IP 172.31.0.1
it shall have later and to prevent it colliding with the existing network. As it will replace the endian. (It could be another endian and I believe the problem would be the same).
I would like to access the web configuration page on the opnsense VM from my work PC which has 192.168.x.y
. So in browser I enter 172.31.0.1
.
As long as I use a 192.168.x.y address that I statically set in opnsense this works fine. But as soon as I use a 172.31.0.1 address I cannot reach it from my work PC.
I see that from my work PC it (tracert - windows pc) to the internet. So I added a route to endian:
192.168.x.0/24 to 172.31.0.0/16
via static gateway 192.168.x.10 (endian routing rule)
This prevents that the tracert shows that it is routed to the internet but it does not reach the opnsense server.
I did try several other settings in endian like adding a host entry or adding outgoing firewall rules. But I am missing something in understanding. How could I make this work? Or won't this work?
Update 2:
Netgear is a GS752TPv2. There are no tagged VLAN.
All pcs, opnsense and endian lan interface 1 are all in VLAN Id 1.
Uplink to internet ist VLAN Id 4 and connects endian lan interface 2 to dsl modem.
Endian configuration:
- dhcp server serving range
192.168.x.11 to 192.168.x.253
- firewall:no port forwarding, no source NAT, no incoming routed traffic configured zones are only used: red and green.
- outgoing firewall:many rules all of the form: green to red allowing different ports or protocols.
HERE I added a rule:
- green to
172.31.0.1
(opnsense) for all - but it did not change anything. I left it in there until I end my tests.
The other testing configuration: - is routing in static routing config of endian (as stated above):
192.168.x.0/24 to 172.31.0.0/16
with static gateway192.168.x.10
(endian). this one is also still active
Uplink manager of endian: is configured to connect to the DSL modem on the LAN interface on UPlink VLAN.
That is about all of the configuration for endian and switch.