Public IP display problem

Hello everyone
I have a display problem of public IP of my server Synology connected person
Before as it logs on to my server ip public could see the connected person
Since I have my new router CCR1009 I see more public IP but the IP of the router that is 192168.1.1
Do you know why ?
Thanks in advance for your help
Claude

Sorry for the English translation

Hi,
it’s about NAT , send your router configuration please

Hello,
Here are the rules that I set

add chain=dstnat dst-address-type=local dst-address=!192.168.0.0/16 action=jump jump-target=pinholes
add chain=pinholes protocol=tcp dst-port=80,443 action=dst-nat to-address=192.168.1.198
add chain=pinholes protocol=tcp dst-port=98,8443 action=dst-nat to-address=192.168.1.198

it seems you need this : http://wiki.mikrotik.com/wiki/Hairpin_NAT

I’d say you’re hiding something from us. :wink: What about srcnat rules?

The problem is that I know nothing has it all

No I have nothing to hide :smiley:
Here are my 2 other rules

add action=masquerade chain=srcnat out-interface=vlan832-orange
add action=masquerade chain=srcnat out-interface=all-ethernet

So, which one of those two rules do you think is the reason of your problem? You have two guesses.

Yes, it’s number two. Why? Because out-interface=all-ethernet means any ethernet interface. So when packet from internet goes to your LAN and your LAN is connected to router’s ethernet interface, …

Hello,
At first I was given this line: add action = masquerade chain = srcnat out-interface = vlan832 orange-to-addresses = 0.0.0.0
But to-addresses = 0.0.0.0 does not pass
Regarding the content add action=masquerade chain=srcnat out-interface=all-ethernet
What do I do ?
A switch was made to the ports 1 to 4
Sorry but I know nothing has it all

At first I was given this line: add action = masquerade chain = srcnat out-interface = vlan832 orange-to-addresses = 0.0.0.0
But to-addresses = 0.0.0.0 does not pass

what is orange-to-addresses = 0.0.0.0 ?


we don’t know how your Synology connected to your network , and which interface , but excluding that interface from NAT may solve the problem

Grieve if my information is incomplete
The router interface: 192.168.1.1
The interface of the server 192.169.1.198
The server is connected to the port Ether3
I also try the little ether8 port ?
Access to the server is outside via a domain name

disable this add action=masquerade chain=srcnat out-interface=all-ethernet
and check your Synology log , see what happens ?

From the outside I arrive on the server, log shows me the same IP, the router
By cons I do not have access to any site from my computer

When I get this line via winbox /ip firewall nat add chain=srcnat action=masquerade out-interface=Public
Here is the response from the router

Because you do not have any interface named “Public” :smiley:

Yeah but I do how to do this ? :slight_smile:

For basic setup, you need only one srcnat rule:

/ip firewall nat
add action=masquerade chain=srcnat out-interface=<name of your WAN interface>

I though your WAN interface was vlan832-orange, but perhaps it’s not. If you look in IP->Routes, what is the name of interface with default route (the one with destination address 0.0.0.0/0)?

Or you can just post complete export (/export hide-sensitive) and let us look.

Remove those 4 NAT rules:
add action=masquerade chain=srcnat out-interface=all-ethernet
add chain=dstnat dst-address-type=local dst-address=!192.168.0.0/16 action=jump jump-target=pinholes
add chain=pinholes protocol=tcp dst-port=80,443 action=dst-nat to-address=192.168.1.198
add chain=pinholes protocol=tcp dst-port=98,8443 action=dst-nat to-address=192.168.1.198


Then add these 2 rules:

add action=dst-nat chain=dstnat dst-address-type=local dst-port=80,98,443,8443 protocol=tcp to-addresses=192.168.1.198 comment="WAN pinhole to Synology"
add action=masquerade chain=srcnat dst-address=192.168.1.198 protocol=tcp src-address=192.168.0.0/16 comment="LAN to Synology"

You will see in Synology log external IP addresses of connected users from internet.
With this you can connect also from inside your LAN using your external IP or your domain name.
Only side effect is that all connections from your LAN will show as router address 192168.1.1 :laughing:

as i suggested : http://wiki.mikrotik.com/wiki/Hairpin_NAT

but he’s using internet too , so a NAT should be added for internet access

Error message

The road