POD Disconnect problems due to NAT

Hi

We are using a Mikrotik router do do natting onto local devices on our network. Each device has a private static ip but we nat via the firewall to the devices through the Mikrotik router and then link a public static IP to it. This way we can have public IPs on our devices for remote communication via the internet etc.

One of the natted devices is a freeradius server which we use for authentication of all our remote links. Every site that we manage has a mikrotik with a public static IP with the necessary usernames passwords and IPs to communicate with the free radius box via the internet. All this works well.

My problem is this:

We are issuing disconnect scripts from the free radius when a user has reached his/her cap. The problem is this that because the Radius is natted behind the main mikrotik the recieving router at the remote site(the one on which the user that has to be disconnected resides) gets the main IP of the mikrotik passed to it in the script and not the radius’s IP address. the disconnect script has to come from the radius’s IP otherwise the remote mikrotik ignores the request. this error happens because the radius is behind a NAT. This in turn causes that the script cannot run and disconnect the selected user.

Will it help to disable ARP on the main interface of the main mikrotik?

Is there any firewall rule or any additional settings i can use for the main mikrotik to pass the radius IP and not the main miktrotik’s interface IP?

help is appreciated :slight_smile:

Post the output of “/ip firewall nat export”.

If you want to mask the public IP addresses in that configuration, please just replace the first two octets with “172.16” or some other private space you’re not actually using in your setup - “x.x.x.15” makes things very hard to read.

Mikrotik on another site without radius

/ip firewall nat
add action=masquerade chain=srcnat comment=“” disabled=no
src-address=191.212.216.0/24
add action=masquerade chain=srcnat comment=“” disabled=no
src-address=196.212.216.40/29
add action=masquerade chain=srcnat comment=“” disabled=no
src-address=191.168.216.0/24
add action=masquerade chain=srcnat comment=“” disabled=no
out-interface=External src-address=192.168.216.0/24


The site With the freeradius Box

/ ip firewall nat
add chain=srcnat src-address=10.101.0.0/16 action=masquerade comment=“”
disabled=no
add chain=srcnat src-address=192.168.1.10 action=netmap
to-addresses=41.162.1.129 to-ports=0-65000 comment=“” disabled=no
add chain=srcnat src-address=10.100.0.0/16 action=masquerade comment=“”
disabled=no
add chain=srcnat src-address=10.10.0.0/16 action=masquerade comment=“”
disabled=no
add chain=dstnat dst-address=41.162.56.70 protocol=tcp dst-port=1000
action=netmap to-addresses=10.100.0.1 to-ports=80 comment=“” disabled=no
add chain=dstnat dst-address=41.162.1.129 action=netmap
to-addresses=192.168.1.10 to-ports=0-65000 comment=“” disabled=no
add chain=srcnat src-address=41.162.1.128/26 action=masquerade comment=“”
disabled=no
add chain=srcnat src-address=192.168.1.11 action=src-nat
to-addresses=41.162.1.130 to-ports=0-65535 comment=“PBX Kindlewood”
disabled=no
add chain=dstnat dst-address=41.162.1.130 action=dst-nat
to-addresses=192.168.1.11 to-ports=0-65535 comment=“” disabled=no
add chain=srcnat src-address=192.168.1.0/24 action=masquerade comment=“”
disabled=no
add chain=srcnat src-address=192.168.1.5 action=src-nat
to-addresses=41.162.1.132 to-ports=0-65535 comment=“24 Online” disabled=no
add chain=dstnat dst-address=41.162.1.132 action=dst-nat
to-addresses=192.168.1.5 to-ports=0-65535 comment=“24 Online External”
disabled=no
add chain=srcnat src-address=192.168.1.9 action=src-nat
to-addresses=41.162.1.140 to-ports=0-65535 comment=“Weather station”
disabled=no
add chain=dstnat dst-address=41.162.1.140 action=dst-nat
to-addresses=192.168.1.9 to-ports=0-65535 comment=“Weather Station NAT”
disabled=no
add chain=srcnat src-address=192.168.1.0/24 action=masquerade comment=“”
disabled=no
add chain=srcnat src-address=172.16.0.0/24 action=masquerade comment=“”
disabled=yes
add chain=srcnat src-address=192.168.1.15 action=masquerade comment=“”
disabled=yes
add chain=srcnat src-address=172.27.0.10 protocol=ipsec-esp action=netmap
to-addresses=41.162.1.131 to-ports=80 comment=“Alloptic Edge2000”
disabled=no
add chain=dstnat dst-address=41.162.1.131 protocol=ipsec-esp action=netmap
to-addresses=172.27.0.10 to-ports=80 comment=“” disabled=no
add chain=srcnat src-address=192.168.1.6 action=src-nat
to-addresses=41.162.1.135 to-ports=80 comment=“” disabled=no
add chain=dstnat dst-address=41.162.1.135 action=dst-nat
to-addresses=192.168.1.6 to-ports=80 comment=“” disabled=no
add chain=srcnat src-address=10.100.0.0/24 action=masquerade comment=“”
disabled=no


your help will be greatly appreciated :smiley: