How to let the internal network device know which external network IP is accessing it?

My ISP won’t let me having public IP for personal use anymore, I can rent a commercial broadband tho but it would cost way too much, so I figure just go use port forwarding.


A as vistor
B as Zerotier node, VPS, OpenWrt, public IP yes
C as Zerotier node, Home LAN, OpenWrt, public IP no
D as Computer, Home LAN


Let D knows vistor is A instead of vistor C

My thought:

If AWANLAN Device, LAN Device vistor IP: A

Practice in real world:

B as OP Gateway, act I think sort of WAN position
C connected to B
D connected to C(I think just a few layers of NAT, right?(obviously no I guess)

Reality comes out:

AB(WAN) → C(WAN) → D(Computer) vistor IP: C


screenshot of B, OpenWrt Firewall

New can only attach one media, so here’s the reset of the configure.

Btw I tried configuring port forwarding at C first, but it doesn’t matter, because even if I port forward C in B, A access C, C will show B IP, not A.AND if B deselects LAN Masquerading, A can no longer access anything forwarded by B to C or D.

ABC, vistor IP: B

so sorry for my skill of explaining things, I sucks at english grammer.