How-to
Routing browser access to a fixed-IP HMI over two subnets
Short answer
A router with one interface in each network is the correct way to join 192.168.2.x to a fixed 198.168.120.x panel, with a return route or scoped source NAT for the replies. Widening the mask to 255.255.0.0 cannot work because the two prefixes stay separate, and 198.168.x is not RFC 1918 space, so it must stay behind the router.
On this page
A router with one interface in each network is the correct answer, and it works without changing a single panel, PLC or modem address: the customer's 192.168.2.x network and the panel's 198.168.120.x network stay as they are, and the router forwards packets between them. The return path is the part to design — a default gateway pointed at the router, or source NAT scoped to panel-bound traffic where the gateway must not change. Widening the subnet mask to 255.255.0.0, the suggestion you were given, cannot work, and 198.168.x is not RFC 1918 private space, so it must never be advertised past the router. The steps below verify the prefixes, prove the panel's web service locally, then build the routed path and the VPN that protects it.
Read the prefixes before anything else #
Everything hangs on one digit. 198.168.120.x and 192.168.120.x are different networks and not neighbours: the first octet is 198 on one side and 192 on the other. Read the full address, mask and default gateway of the panel, the PLC, the technicians' modem, the customer's fiber-termination device and the customer's remote-monitoring unit, and confirm the digits rather than silently correcting 198 to 192.
RFC 1918 reserves exactly three blocks for private use: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. Everything outside them is ordinary public internet space, and 198.168.0.0 is outside them, so the plant is using addresses that belong to real internet destinations. Behind a router performing NAT that is survivable; advertised into a VPN or routed toward the internet, the prefix captures traffic meant for its rightful owner. Decision: if the panel really reads 198.168.120.x, that prefix stays behind the router permanently.
While reading, settle what the fiber-termination device actually is. An optical switch forwards Ethernet frames; a router forwards packets between IP networks; an IP address on the box may be nothing more than its management interface. Look for routed interfaces and a route table before you count on it.
Worked example: joining 192.168.2.0/24 to a panel at 198.168.120.50 #
Inputs:
- Customer network 192.168.2.0/24 with mask 255.255.255.0, as reported by the site; the browser host is taken as 192.168.2.10, an example address inside that range.
- Panel network 198.168.120.0/24, as reported; the panel is taken as 198.168.120.50, an example address inside the reported range.
- The proposed fix: change every mask from 255.255.255.0 to 255.255.0.0.
Rule: a host delivers a packet directly to a destination only when its own address and the destination, each ANDed with the subnet mask, produce the same network number. Everything else goes to the default gateway.
Arithmetic:
- At 255.255.255.0: 192.168.2.10 AND 255.255.255.0 = 192.168.2.0, while 198.168.120.50 AND 255.255.255.0 = 198.168.120.0. Different, so the browser hands the packet to a gateway — and no gateway exists between these two networks.
- At 255.255.0.0: 192.168.2.10 AND 255.255.0.0 = 192.168.0.0, while 198.168.120.50 AND 255.255.0.0 = 198.168.0.0. Still different, because the mismatch sits in the first octet, which a /16 mask does not touch.
- Shortest possible merge: 192 is 11000000 and 198 is 11000110 in binary, agreeing on only the first five bits, so the smallest covering prefix is 192.0.0.0/5 (mask 255.248.0.0), spanning 192.0.0.0–199.255.255.255 — 2 to the 27th power, 134,217,728 addresses, nearly all of it ordinary public internet space.
Result: no mask a plant would deploy makes these two networks local to each other.
Decision: reject the mask change outright and route. If the panel address turns out to read 192.168.120.x after all, the /16 arithmetic would overlap, but direct delivery would still require both sides to share one Layer-2 broadcast domain, and two networks on separate equipment joined through fiber are not that — you route in that case too.
Prove the panel serves pages before you route #
A reachable Ethernet interface is not a browsable HMI. The panel must run its documented web-server or remote-view function, enabled through the supported configuration procedure, and what it serves must be the operator pages the customer wants, not a maintenance screen. Check the manufacturer documentation for the exact service, port, authentication and any licensing requirement, then test from a laptop on the panel network and record the working URL, protocol and port.
That record is the acceptance test for everything built after it, and the firewall rule is written against exactly that destination and port. Where the customer needs to watch rather than operate, configure the documented read-only mode — the same distinction that governs making a read-only web client mirror of an HMI screen.
Build the path: one router, two interfaces, a working return #
Install a router or firewall with one interface in each network, on unused addresses from each range. The forward path is simple; the design decision is the return path, because the panel must be able to answer a browser it has no route to.
| What you are allowed to change | Forward path | Return path |
|---|---|---|
| The panel's default gateway | Through the router | Point the panel's gateway at the router's 198.168.120.x interface; replies follow the default route |
| Nothing on the panel | Through the router | Source NAT scoped to panel-bound traffic: the panel answers the router's own 198.168.120.x address, and the router reverses the translation |
| Nothing on the customer side either | Terminate the VPN on the router, so remote clients hold addresses that already route | Same source-NAT treatment |
Source NAT hides the client's address from the panel, so keep client identity in the firewall and VPN logs. Permit exactly one destination — the panel — and one service, the documented web port; the PLC stays blocked. Leave the technicians' modem out of every NAT pool and route.
Terminate the VPN on the router, not on the panel #
Remote browsers come in through a VPN terminated on that same managed router or firewall. Never forward the panel's web port to the internet: an exposed HMI web service is an unencrypted remote-control path into a running machine.
Because 198.168.120.0/24 is not RFC 1918 space, check route overlap before advertising it to VPN clients — a client whose own network or upstream needs the real 198.168.x internet addresses would lose them — and where that risk is real, destination-NAT the panel to a private address on the router and advertise that instead. If the fiber service at the site offers no inbound connections, use a design where the site establishes the tunnel outward. Give each authorized user access to the panel's web port and nothing else. The design for the case where the site has no fixed public address is the one behind remote HMI access with dynamic DNS and a VPN.
The procedure in order #
- Record the full address, mask and default gateway of the panel, the PLC, the technicians' modem, the fiber-termination device and the customer's remote-monitoring unit. Confirm 198.168 versus 192.168 digit by digit.
- Decide what the fiber-termination device is: look for routed interfaces and a route table, not just a management address. A switch forwards frames; only a router forwards packets between the two networks.
- Test the panel's documented web service from a laptop on the panel network. Record the URL, protocol, port and access mode.
- Choose two unused addresses, one in each network, for the router's interfaces.
- Cable the router into both networks and confirm link on each interface before any IP testing.
- Configure the forward route, then the return path: panel default gateway to the router where permitted, otherwise source NAT scoped to panel-bound traffic.
- Write the firewall rule: permit the VPN or client range to the panel's address on the documented web port only.
- Test from the customer network with a browser and confirm requests and replies on both router interfaces in the logs — a successful ping proves neither direction of a TCP session.
- Terminate the VPN on the router, check client route overlap for 198.168.120.0/24, destination-NAT to a private address if overlap exists, and verify from an external connection.
- Hand over the tested URL, the firewall rules and the statement that the technicians' modem path is unchanged.
Questions asked
Why can't we merge the two networks by setting the mask to 255.255.0.0?
Because the first octets differ. Widening the mask turns 192.168.2.0 into 192.168.0.0 and 198.168.120.0 into 198.168.0.0, which are still two networks. The shortest prefix covering both 192 and 198 is /5, written 255.248.0.0, which spans 192.0.0.0 to 199.255.255.255 and includes assigned public internet space, so no deployable mask merges them.
The panel address might really be 192.168.120.x. Does the wide mask work then?
Only if both sides share one Layer-2 broadcast domain, meaning the same switches or a bridged link between them. Two networks on separate equipment joined through fiber are separate broadcast domains, so hosts still hand off-network traffic to a gateway. Mask widening also changes what every connected host treats as local, which would reach the modem-based access the technicians use at every client site.
Is 198.168.120.x private address space?
No. RFC 1918 reserves 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 for private use, and 198.168.0.0 is outside all three, so the plant is using assigned public internet space internally. Keep it behind the router's NAT, never advertise it into a VPN or toward the internet, and destination-NAT the panel to a private address if remote clients need a route to it.
Ping reaches the panel through the router but the browser times out. What is wrong?
ICMP proves only the forward path. A browser page needs a full TCP session on the documented port, which requires the panel's reply to come back. Check in order: the destination route on the client, the source address after any NAT, the firewall decision in the router log, and whether the panel's reply is following its default gateway instead of the router.
Does adding the router disturb the technicians' modem on 198.168.120.x?
No, provided you leave the modem alone. The router adds one interface in that network and takes one unused address; existing devices keep their addresses and gateways. Keep the modem's address out of any NAT pool and write no route that sends its traffic through the new router.