Community discussions

 
czsniper
just joined
Topic Author
Posts: 9
Joined: Thu Feb 02, 2017 5:26 pm

Split /24 public ip addresses

Fri Aug 09, 2019 5:25 am

Hi. How can i split an /24 public ip address to 1:8 private address.
Example of one private /24 address:
Gateway 192.168.0.1
mask: 255.255.255.0
clients from 192.168.0.2 to 192.168.0.8 goes to internet trough 86.123.123.1
clients from 192.168.0.8 to 192.168.0.15 goes to internet trough 86.123.123.2
clients from 192.168.0.16 to 192.168.0.23 goes to internet trough 86.123.123.3
and so one ...

Thank you !
 
User avatar
cdiedrich
Forum Veteran
Forum Veteran
Posts: 899
Joined: Thu Feb 13, 2014 2:03 pm
Location: Basel, Switzerland // Bremen, Germany
Contact:

Re: Split /24 public ip addresses  [SOLVED]

Fri Aug 09, 2019 8:12 am

Pretty straight forward:
/ip firewall address-list
add list=wan.1 address=192.168.0.2
add list=wan.1 address=192.168.0.3
...
add list=wan.2 address=192.168.0.9
add list=wan.2 address=192.168.0.10
...and so on

/ip firewall nat
add action=src-nat src-address-list=wan.1 to-address=add list=wan.1 address=86.123.123.1
add action=src-nat src-address-list=wan.2 to-address=add list=wan.1 address=86.123.123.2
...and so on.
-Chris
Christopher Diedrich
MTCNA, MTCUME, MTCWE
Basel, Switzerland
Bremen, Germany

There are 10 types of people: Those who understand binary and those who don't.
There are two types of people: Those who can extrapolate from incomplete data
 
czsniper
just joined
Topic Author
Posts: 9
Joined: Thu Feb 02, 2017 5:26 pm

Re: Split /24 public ip addresses

Fri Aug 09, 2019 7:56 pm

Thanks Chris !

Who is online

Users browsing this forum: No registered users and 22 guests