Setting Ip

Hello, please help, im new in mt.. :slight_smile:
I want to set in ether1 (local) with different ip add..
ex 192.168.8.1/29 and 192.168.4.1/30 with 1 public ip add in ether2
Is it possible? How to do that? Thanks for the answer

hello,

as far as I understood, you want to have two subnets on private(local iface), and all traffic goes through public one.


First of all in /ip address section add those two subnets:

add address=192.168.8.1/29 network=192.168.8.0 broadcast=192.168.8.7
interface=local comment=“” disabled=no
add address=192.168.4.1/30 network=192.168.4.0 broadcast=192.168.4.3
interface=local comment=“” disabled=no

then attach public IP on public interface (the same rule as with local IPs)

then in /ip firewall nat section create masquarade:

add chain=srcnat src-address=192.168.8.0/29 action=masquerade comment=“”
disabled=no
add chain=srcnat src-address=192.168.4.0/30 action=masquerade comment=“”
disabled=no

then add default route (all traffic will pass through public iface):

/ip route add gateway=x.x.x.x disabled=no

thats all.

Regards,

Stoned.

thanks.. :smiley: i will try ok