Community discussions

 
mukeshchaubey
newbie
Topic Author
Posts: 30
Joined: Wed May 31, 2017 8:13 pm

how to do Dynamic nat 100 private ip with /24 public ip

Sat Jan 19, 2019 8:20 pm

Hi
Can you please help me how to do Dynamic nat of apporx 100 private ip with /24 public ip pool . thanks
 
User avatar
sebastia
Forum Guru
Forum Guru
Posts: 1790
Joined: Tue Oct 12, 2010 3:23 am
Location: Antwerp, BE

Re: how to do Dynamic nat 100 private ip with /24 public ip

Sat Jan 19, 2019 11:12 pm

Hello

Not sure if I understand the question: you want to do natting from private ip's (100) to /24 public (253) ip's pool. Where is the challenge?
 
mkx
Forum Guru
Forum Guru
Posts: 3173
Joined: Thu Mar 03, 2016 10:23 pm

Re: how to do Dynamic nat 100 private ip with /24 public ip

Sun Jan 20, 2019 10:54 am

One of challenges is how to avoid entering 100 nat rules by hand.

The other could be (not expressed in OP) that public address pool might not be static (I don't know any reason for it but it's still possible).

We'll wait for @mukeshchaubey to describe use case.
BR,
Metod
 
User avatar
JohnTRIVOLTA
Member Candidate
Member Candidate
Posts: 207
Joined: Sun Dec 25, 2016 2:05 pm
Location: BG/Sofia

Re: how to do Dynamic nat 100 private ip with /24 public ip

Sun Jan 20, 2019 12:52 pm

Hi
Can you please help me how to do Dynamic nat of apporx 100 private ip with /24 public ip pool . thanks
Use NETMAP for source nat !?
 
anav
Forum Guru
Forum Guru
Posts: 3091
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada

Re: how to do Dynamic nat 100 private ip with /24 public ip

Sun Jan 20, 2019 3:44 pm

Confused but are we talking one to one mapping of block of public IPs to private IPs and doing so in a manner that is not tedious.
I know with zyxel router you could do that simply by stating ranges........... block of public IP assign to a sequential (range) block of private IPs, quick and simple.
I'd rather manage rats than software. Follow my advice at your own risk! (Sob & mkx forced me to write that!)
 
User avatar
CZFan
Forum Guru
Forum Guru
Posts: 1430
Joined: Sun Oct 09, 2016 8:25 pm
Location: South Africa, Randburg
Contact:

Re: how to do Dynamic nat 100 private ip with /24 public ip

Sun Jan 20, 2019 3:57 pm

Typically used when you have like lots of users / devices behind a NAT to prevent running out of port numbers (PAT) for a single IP NAT but not typically for 100 users/devices, never tested, but maybe:
/ip firewall nat
add action=src-nat chain=srcnat out-interface-list=WAN src-address=192.168.88.0/24 to-addresses=201.200.200.0/24
MTCNA, MTCTCE, MTCRE & MTCINE
 
User avatar
sebastia
Forum Guru
Forum Guru
Posts: 1790
Joined: Tue Oct 12, 2010 3:23 am
Location: Antwerp, BE

Re: how to do Dynamic nat 100 private ip with /24 public ip

Sun Jan 20, 2019 4:14 pm

Typically used when you have like lots of users / devices behind a NAT to prevent running out of port numbers (PAT) for a single IP NAT but not typically for 100 users/devices, never tested, but maybe:
There a wiki for that ;-) https://wiki.mikrotik.com/wiki/Manual:I ... :1_mapping
 
User avatar
JohnTRIVOLTA
Member Candidate
Member Candidate
Posts: 207
Joined: Sun Dec 25, 2016 2:05 pm
Location: BG/Sofia

Re: how to do Dynamic nat 100 private ip with /24 public ip

Sun Jan 20, 2019 4:26 pm

I think this rules will work :
/ip firewall address-list
add address=192.168.0.1-192.168.0.100 list=100private_addresses #just add your private ip addresses in address list#
/ip firewall nat
add action=accept chain=srcnat src-address-list=!100private_addresses
add action=netmap chain=srcnat src-address=192.168.0.0/24 to-addresses=1.1.1.0/24
 
User avatar
CZFan
Forum Guru
Forum Guru
Posts: 1430
Joined: Sun Oct 09, 2016 8:25 pm
Location: South Africa, Randburg
Contact:

Re: how to do Dynamic nat 100 private ip with /24 public ip

Sun Jan 20, 2019 6:00 pm

Typically used when you have like lots of users / devices behind a NAT to prevent running out of port numbers (PAT) for a single IP NAT but not typically for 100 users/devices, never tested, but maybe:
There a wiki for that ;-) https://wiki.mikrotik.com/wiki/Manual:I ... :1_mapping

Not really the same thing, the wiki is for 1:1, and use "netmap" as action :-)

The intention of my example is that the router has a pool of IP's to NAT to, i.e. I have seen it once on a Fortinet device where we had +- 4000 mobile clients NAT/PAT out on a single IP, it complaint about available ports and I had to specify a pool of IP's for NAT/PAT.
MTCNA, MTCTCE, MTCRE & MTCINE
 
User avatar
sebastia
Forum Guru
Forum Guru
Posts: 1790
Joined: Tue Oct 12, 2010 3:23 am
Location: Antwerp, BE

Re: how to do Dynamic nat 100 private ip with /24 public ip

Sun Jan 20, 2019 6:15 pm

As already pointed out, al that is academical until @mukeshchaubey responds...
 
mukeshchaubey
newbie
Topic Author
Posts: 30
Joined: Wed May 31, 2017 8:13 pm

Re: how to do Dynamic nat 100 private ip with /24 public ip

Tue Jan 22, 2019 2:27 pm

Thanks for reply ..

Now I am using netmap with my private ip pool 192.168.1.0/24 with public ip pool of 103.x.x.0/24 ip address . and its working .. .. now again my quatation is if my private ip is beyond /24 . mean number of user is like 500 ..will this policy work or not ... is it one to one nat policy ?

thanks for support ..

Who is online

Users browsing this forum: No registered users and 26 guests