Community discussions

MikroTik App
 
diniboy
just joined
Topic Author
Posts: 15
Joined: Wed Jul 21, 2021 2:10 am

1:1 NAT possible?

Wed Nov 09, 2022 6:53 pm

Hi,

This is all in theory, so I cannot post a config yet, but I am thinking what would be ideal. My ISP provides two PPPoE sessions. Both have an IPv4. I would use the first one to empower a pretty usual 192.168.1.0/24 network and I would connect my server to this LAN. Let's say it gets 192.168.1.3.

What I want to do is a 1:1 NAT, so the server gets the second PPPoE session and therefore its own public IP, but at the same time it still remains accessible for the LAN on 192.168.1.3. How would one ideally do that? For now I managed to get it to use the IP address of PPPoE session #2 using a route table and a prerouting rule, but that doesn't seem to be ideal.

Thanks
 
Sob
Forum Guru
Forum Guru
Posts: 9119
Joined: Mon Apr 20, 2009 9:11 pm

Re: 1:1 NAT possible?

Sat Nov 12, 2022 7:46 pm

You can try routing rules:
/routing rule
add dst-address=192.168.1.0/24 action=lookup table=main
add src-address=192.168.1.3/32 action=lookup table=<second routing table>

Who is online

Users browsing this forum: baragoon, Google [Bot], JDF, RHWwijk and 78 guests