Hi, i have a configuration trouble…
so far my network worked as normal, 1 public address, 1 LAN address, nat-mascarade in between, and no problem…
now i have a problem…
WAN address: x.250.52.166
LAN address: 192.168.1.x
and public subnet x.250.51.0/28 routed to WAN address.
how do i configure mikrotik to keep my LAN addresses intact and lets say have every 3 lan pcs on 1 public subnet for all 14 public subnet addresses?
192.168.1.1-3 on x250.51.0.1
192.168.1.4-6 on x250.51.0.2
etc…
? any ideas… im lost here…
Binary multiples are easiest.
/ip firewall nat add chain=srcnat action=src-nat src-address=192.168.0.4/30 to-addresses=x.250.51.1
/ip firewall nat add chain=srcnat action=src-nat src-address=192.168.0.8/30 to-addresses=x.250.51.2
and so on…
Order in this list is important.
Your gateway is the same for these IP sets, correct?
And this is not in the netmask above:
WAN address: x.250.52.166
This isn’t the gateway, is it?
thanks for the reply…
my gateway is x.250.52.165, x.250.52.166 is wan address
and its the same for all addresses
so basically by adding
/ip firewall nat add chain=srcnat action=src-nat src-address=192.168.0.4/30 to-addresses=x.250.51.1
i will have 192.168.1.1, 192.168.1.2 and 192.168.1.3 on x.250.51.1 external address?
i made a mistake.. it is 192.168.5.0/30 LAN address pool but ok… that doesnt change anything…
You would have 192.168.0.4 to 192.168.0.7 on the first.
Modify these to suit your needs.
192.168.0.0/30 would be the first 4 IPs. First usable 2 actually. Normally 192.168.0.1 is the gateway.
OK, its not working…
basically tell me where im wrong, this is my current config:
Mikrotik WAN Address: x.250.52.166
Mikrotik LAN Address: 192.168.5.5
Default Gateway: x.250.52.165
DNS: x.250.33.21
in nat i added your rule for a single ip address to check:
/ip firewall nat add chain=srcnat action=src-nat src-address=192.168.5.51 to-addresses=x.250.51.1
not working
i cant even ping isp gateway form MT box…
i know its something stupid but i cant remember what… i havent touched mikrotik for 3 years and am a little rusty…
thx for the help!
What netmask did your ISP give you? Insure that is correct in your IP assignments.
/ip address print
Insure your gateway route is showing reachable.
/ip route print
Only other info i got is this…
Your WAN Subnet is x.250.52.164/30…
the rest is in the post above…
so… i need to ring my isp coz it can be his fault?
sry for the stupid questions but im baffled by all of this… it should be working… from the MT box anyways…but im having nothing…
If all shows ok (gateway reachable and all), it may be your ISP or the modem. You might want to try unplugging the cablemodem or dsl modem for a minute. Sometimes they are kinda funny, especially if there has been another mac address using the IP before. I use the same IPs for testing and must reboot my cablemodem every time I set up a new box or no ping/dns/etc.
i have the same problem !
My isp gave to me an ip XXX.XXX.195.134/30 to connect with them and an ip subnet for my network xxx.xxx.221.208/26 .
I have a routerboard with 3 interfaces ( rb 333) and i need to create 2 diferent networks with 2 different public ips .
In the first network i have my voip network 10.0.10.0/24 with publik ip xxx.xxx.221.209
and in the second network i have my pc network 10.0.11.0/24 with public ip xxx.xxx.221.210 .
ALL the configuration i made until now is :
i Added an ip to one interface xxx.xxx.195.134/30 to connect with my isp provider
i added an ip to the second interface 10.0.10.1/24 to create a dhcp server , cofigure the firewall nat to masquerade the 10.0.10.0/24 network and started a dhcp server
i added a role on the route an i typed 0.0.0.0/24 gateway interface interface one (the one connects me with the provider)
The problem now is that i use my gateway for public ip xxx.xxx.195.134 and i don’t know how to add one of my public ips to my networks !
And i don’t know how to give priority and guaranteed banwith to my voip network !