ip firewall nat> print
Flags: X - disabled, I - invalid, D - dynamic
0 chain=srcnat out-interface=ether2 src-address=40.40.40.0/24
action=masquerade
My clients are 40.40.40.x/24 behind ether1, and they go out ether2 with 192.168.145.101 ip address.
I need to log all mappings 40.40.40.x:portA --> 192.168.145.101:portB because I want to trace it.
I tryied with:
ip firewall nat> print
Flags: X - disabled, I - invalid, D - dynamic
0 chain=srcnat out-interface=ether2 src-address=40.40.40.0/24
action=log
but I can see only 40.40.40.x:portA --> public destination ip addr:portB,
so I haven't mapping 40.40.40.x:portA --> 192.168.145.101:portB logged.
Masquerading job should be to hide private IP behind public IP EXTERNALLY … I expect MT (natting) router should show me “nat table”, with information I need, as almost all router do … isn’t it ?
Note: “public IP address” is the same for all (masqueranding)
private IP address_1:port_A → public IP address:port_B
private IP address_2:port_C → public IP address:port_D
private IP address_3:port_E → public IP address:port_F
private IP address_4:port_G → public IP address:port_H
For example, if some client of mine goes to web site with public IP address 30.30.30.30:80, client (natted) public IP and port will be “public IP address:some_port”, but I need to know what is real private IP address and port doing web access … only nat table can give this information.
what do you understand with port in this case? ethernet port? you have many? how do you determine which clients use which ethernet port? I am really sure that you are looking in the wrong place to solve a simple problem
“The router is keeping a table of src-natted connections so it can do the reverse mapping (of incoming response packets) without further config. That’s the way all standard masquerading devices work.”
I mean that table of src-natted connections.
Does it exist in MT a way to log/view/report/print such a table ?
use torch, it does the same thing. if it lacks some feature, please write which one. you are able to see the src-address, the dst-address and the ports. what else is missing?
torch (and packet sniffer) show me what I want.
Does exist a way to log such information ?
I mean that in my country, as an ISP, we are forced by law to trace and log every single user session (but absolutely not session content), so I need to trace/log for every user session:
source (private) user IP address and (private) TCP/UDP port,
source-natted (public) user IP address and (public) TCP/UDP port,
destination (public) IP address and (public) TCP/UDP port.
Thanks tgrand, but I don’t need (and I don’t want) hotspot on that device … it’s an MKTK firewall behind Internet router … I only need to collect info about PAT table into a syslog server to trace and store user sessions as in my previous post
Long time no answer, is there any new feature in RouterOS that can help people to log all connections (with reply src-reply-address and dst-reply-address)?