i have for example 199.10.1.224/22 (not my public ip). I want to srcnat all customers using all public ips from the same ISP in the example. If doable.
Please no need for more setup explanations. The question is so simple. If anyone has an idea…I am all ears.
does the reverse, it attempts to assign the same IP address from the pool to all requests coming from the same internal address. But this happened even with normal
action=src-nat
when I’ve tried a couple of weeks ago, so I didn’t really understand the purpose of
I am affraid of asymmetric routing problem here.
Also will Mikrotik keep tracking all connections from both directions between each public ip and its own related (translated) internal ip.
Just quick questions came to my mind…
I will check for a few days to see the results.
The nth method is for load balancing…I have to check it also for this purpose here.
P.S. The easiest solution, will be to use a script that changes each hour for example the srcnatted public ip.
Also will Mikrotik keep tracking all connections from both directions between each public ip and its own related (translated) internal ip.
Yes, this works automatically, NAT is a property of connection tracking, so no worry here.
The nth method is for load balancing…I have to check it also for this purpose here.
That does not mean that it would not work here. The ****
nat
table is only passed by packets with
connection-state=new
. The only issue is that the way I’ve quickly put them they wouldn’t distribute the traffic among the addresses evenly because there is no
passthrough=yes
option in
nat
table, so you would have to order them, top to bottom,
nth=5,1
;
nth=4,1
;
nth=3,1
;
nth=2,1
; no
nth
matcher.
The easiest solution, will be to use a script that changes each hour for example the srcnatted public ip.
It would work but I cannot see the sense if you would rotate the addresses that slowly. Normally you use several src-nat addresses to have a larger pool of ephemeral TCP ports. Plus you’d brush the disk
If you have enough addresses to assign to all customers then the cleanest solution would be to set up a pppoe server. Then each customer will have their own ip and if you use a radius server you will have good stats/accounting