Balance 20 Rewrite packet address?

Howdy, I’ve been over-engineering a homelab setup and wasn’t sure if the peplink balance 20 (BPL-021) had built-in ability for packet IP dest rewrite?

Use case:
off network: mydomian.com => 1.2.3.4
But 1.2.3.4 is a reverse-proxy (with client cert) that connects via VPN to local-network and allows access to homelab sites.

on network: mydomain.com => 1.2.3.4, but sent packets are re-written to 192.168.50.3.
192.168.50.3 is a reverse-proxy (without client cert) that of course does not need VPN or even internet since everything is hosted on network.

why not DNS routing?
Phones and other mobile devices. Don’t want them to DNS cache mydomain.com is 1.2.3.4 and then fail ip lookup. This was my original attempt.

I tried a static route in network settings,
1.2.3.4/32 => 192.168.50.3 but that didn’t seem to take, that says for local networks so I wasn’t expecting it to.

Since there is the captive portal- I’m guessing the code must exist somewhere, but not sure if it’s exposed to admins.

edit: would also be nice for when I connect to work VPN. Will automatically switch-over to the off-network case seemly.

1 Like

I am also looking for a solution like this for the Balance 20x, for a similar reason.

Sounds like you might need to use “Virtual Network Mapping” and NAT it.

Otherwise, for DNS, use DNS on the Peplink, set a static dns entry on the peplink with a very short TTL, which will stop your cache issue