Quantcast
Channel: MikroTik
Viewing all articles
Browse latest Browse all 21785

Beginner Basics • lan ip to wan ip scenario

$
0
0
Greetings!
I am working on new mt router with pretty basic config. My goal is to map some ip addresses from lan to some wan ip addresses when necessary.
WAN side is sfp interface with 9 ip addresses, LAN side is one subnet - 192.168.2.0/24. Firewall and nat config is mikrotik basic setup, wireguard is enabled, but has no ip pool yet.
Waht i am currenty doing is to use - ip-firewall-srcnat-src address list=IP_1.1.1.1, then action-netmap-to address - 1.1.1.1. Then in address list tab when i add new entry, i select list=IP_1.1.1.1 and add manually static ip from dhcp server. Then, when it is necessary i set another lan ip to another wan ip etc. When i am testing it seems to work (most of the time) - my ip address is what i enterred in address list - but sometimes it is some of the other wan ip addresses that are configured. How can i be sure that when i set lan ip to 1.1.1.1 wan ip, it will come back correctly from the proper gateway? Probably routing marks? Can someone point me to better way to accomplish this?
Also, i have dhcp lease exported from the old router as rsc file, and address list table too, but when i try to import dhcp lease i get an error - Script Error: failure: server or relay with such interface already exists. Any idea how to import dhcp leases and address list will be appreciated. The system is ROS 7.16.1, CCR2004.
in the attachment is the current config, without dhcp leases and address lists entries.

Regards

Statistics: Posted by gmaslarov — Mon Mar 31, 2025 11:48 pm



Viewing all articles
Browse latest Browse all 21785

Trending Articles