Community discussions

MikroTik App
 
Cablenut9
Long time Member
Long time Member
Topic Author
Posts: 542
Joined: Fri Jan 08, 2021 5:30 am

Selective 1:1 NAT

Mon Jun 14, 2021 5:27 am

I have a weird setup I want to try. Let's say I have two routers and some client on some network.

R1 (DHCP server)
|
R2 (switch/DHCP-proxy)
|
Client (LAN)

I want R2 to act like a layer-2 passthrough, so basically a switch between the two ports that connect it to R1 and LAN. However, I want some rule on R2 that creates a 1:1 NAT when some client tries to contact the main gateway so it can be routed to the internet. This way, R1 can handle all DHCP requests and internet routing for packets sent to it, but with R2 acting as a proxy only for packets sent to R1 and to the internet. I would want to do this to make R2 act like a transparent PCC router and not have to touch R1's settings at all or create a double NAT or have to change anything on the LAN side. Is there a way to do this? I was thinking of creating a simple 1:1 NAT rule where the destination address is !LAN and the routing mark says that the packet should go to R1.
 
dnordenberg
Member Candidate
Member Candidate
Posts: 126
Joined: Wed Feb 24, 2016 8:00 pm

Re: Selective 1:1 NAT

Mon Jun 14, 2021 8:29 am

Sounds like you want something like a full cone NAT on R2. I guess you want R1 to have a different IP/subnet than the rest of the LAN? That would be hard without a double NAT but one thing you might do to skip NAT on R2 is to just use normal routing on R2, adding a static route for LAN on R1 that points back to LAN subnet via R2 and use a DHCP proxy on R2 as you describe.

Who is online

Users browsing this forum: adrianmartin16, almdandi, Amazon [Bot], Bing [Bot], somebilly and 73 guests