Community discussions

MikroTik App
 
Darj
just joined
Topic Author
Posts: 1
Joined: Thu Oct 05, 2023 11:55 pm

RB4011 network setup for an apartment w/ dedicated server

Sat Oct 07, 2023 11:55 pm

Hello there!

I'm new to MikroTik (and advanced networking). I come from a FreshTomato background running on an ASUS router. The network I will be building will be for my apartment. I have couple of devices, including: 3 phones, 3 Raspberry PIs, a PC, 3 Laptops (personal, work and son's), Printer and a dedicated HP server. I've recently got the RB4011 WiFi model and I want to use it as the main router for the whole network.

Currently, the network configuration is relatively simple: ISP <--fiber--> Huawei <--ethernet--> Router <--ethernet/WiFi--> clients. All LAN devices have static DHCP MAC-IP bindings. The server has some ports forwarded for some services to be connectable from the internet. PC and server are the only things connected through the cable, everything else run on WiFi. One of the RPis runs PiHole and is set by FreshTomato's dnsmasq as the main DNS when clients obtain IP from DHCP. Every device, both Ethernet and WiFi are using the same network - 192.168.1.0/24.
One caveat is that my ISP currently allows my ASUS router MAC address (this shouldn't be a problem - I should be able to change the MAC on MikroTik, right?). QoS is disabled because of hardware limitations and I'm getting 300Mbps down instead of the full 750Mbps I should be having. When I turn on CTF I'm getting the full speed, however I can't use QoS then.

What I'm missing right now:
  • QoS + Bandwith Limiting - I'd like to "divide" both upload and download speed so that the requests from/to the server get the highest priority, then work laptop, then my PC, then everything else. The rule of thumb I'd like to use is that 90% of bandwidth is always used across all devices. Ideally I want my server to have high connection speed and low pings for services while I would be working on the laptop, wife watching TV, son play video games with small pings and guests use WiFi without lags/slow downs.
  • No FastTrack/CTF - I have this currently on because that's the only way I'm getting my full internet speed. If I'm understanding this correctly - FT/CTF turned on implies that QoS/Bandwidth Limiting are ignored and I want to have the full bandwidth available for QoS/BW Limit
  • working Hairpin/NAT Loopback - currently the only way I can connect from my PC to the server is to have a LAN IP entry for the domain the server is using in the hosts file. If I'm understanding this correctly - Hairpin NAT would handle that on a network packet level based on some firewall (?) rules
  • Network Flow visualization + monitoring - I'm looking for a way to have some sort of a dashboard with as much details as possible, including: connections displayed on map, drilling down to the network packet level, etc... I can host it on my dedicated server. Any recommendations what open source/free tools I can use for that?
  • Secure and Efficient Firewall w/ server ports forwarded - I understand NAT a little bit but I have no idea about other things like Mangle, Rules etc.. so I can't even really tell if I should consider those or maybe those are required in my case
  • VLANs (?) - I'd want to group some devices and manage those groups in terms of internet connectivity and communication between each other groups, i.e. printer doesn't have to have internet access at all but should be accessible to all LAN devices, work laptop should have internet access and be able to use the network printer but nothing else
  • Ditching Huawei - I might be able to use the SPF+ slot and plug the fiber cable through the connector there but I might have to call the ISP to confirm that the Huawei serves only the purpose of converting fiber to ethernet and I also need to find a proper connector

From what I've already researched, this should be the order of how I should get this all done:
  • Design/Draw network diagram
  • Boot up Mikrotik and remove default configuration
  • Upgrade to the latest version
  • Plug the WAN cable to Eth1 port, Server cable to Eth2 and PC cable to Eth3.
  • Create WAN interface (?), put it the ISP-required MAC address there, create a network of 192.168.1.0/24 (to keep the current addressation) and turn on DHCP with a custom pool
  • Add all the static DHCP leases
  • Create a WiFi Network and it's security profile
  • Setup routing (?)
  • Setup Firewall (QoS, Bandwidth limiting, Port Forwading, other(?))


If I messed up/overdoing/missing something here, let me know - any help and guidance is much appreciated!
 
Moba
Member Candidate
Member Candidate
Posts: 212
Joined: Sun Sep 27, 2020 6:15 pm

Re: RB4011 network setup for an apartment w/ dedicated server

Mon Oct 09, 2023 5:31 pm

Welcome to the forums...

Forgive me, but considering the length of your post, I will just give brief answers...

- There are many ways to achieve QoS on ROS. However, the more you rely on mangle and queues, the more you risk latency and CPU load. If you regularly saturate your connection, you can prioritize devices easily with address list mangle rules and queues. You can also Fasttrack specific traffic and queue everything else.
- NAT is CPU intensive. Since ROS doesn't have CTF or Flow Cache, MT implemented Fasttrack to bypass parts of the firewall to maintain line speed (CPU usage on the 4011 is minimal, under 1 Gbps). It's not HW NAT nor a driver hack like on Asus routers.
- Search the forums or Google for Hairpin NAT on MT.
- You can use the Dude or Prometheus for monitoring (probably other solutions - not something I have used).
- Port forwarding works more or less like on other Linux based firewalls (use search).
- There's a great guide to VLANs on the forums (use search).
- There are some caveats regarding SPF+ for WAN, and it's not required under 1G.
Last edited by Moba on Mon Oct 09, 2023 8:37 pm, edited 2 times in total.
 
Moba
Member Candidate
Member Candidate
Posts: 212
Joined: Sun Sep 27, 2020 6:15 pm

Re: RB4011 network setup for an apartment w/ dedicated server

Mon Oct 09, 2023 6:01 pm

1. If you require more help, a network diagram will get you better guidance - and help you get things running correctly...
2. Building your own config from scratch will greatly improve your knowledge of ROS and help you understand how packets travel on your network. Make sure you add basic firewall rules to secure your network - having a server requires extra hardening and, ideally, isolation.
3. IMO, the 4011 is an older device that underperforms with v7. So unless you need some of the new features, I would use the current Long Term version while it's supported. This is subject to debate, but I own one and tested every important v7 release since launch. YMMV.
4. You can configure ports as you wish, including using multiple WAN gateways.
5-6. Not sure exactly what is required by your ISP, but If you create your config from blank, you will see what can be done with the DHCP server - IP, DHCP Server, Leases and Add New (MAC is there).
7. Yes, on MT devices - you cannot control APs from other vendors
8. https://wiki.mikrotik.com/wiki/Manual:Routing
9. Already replied to these in my previous post...anything you add to the firewall is extra CPU time. Secure your network, then fix performance as required instead of preventing issues you do not have.
Last edited by Moba on Mon Oct 09, 2023 8:50 pm, edited 2 times in total.
 
Moba
Member Candidate
Member Candidate
Posts: 212
Joined: Sun Sep 27, 2020 6:15 pm

Re: RB4011 network setup for an apartment w/ dedicated server

Mon Oct 09, 2023 8:07 pm

Once you have a diagram...

1. Set a new system/password
2. Set the WAN port and DHCP client
3. Create a bridge for LAN and bind the ports as required (including wlan on WiFi models)
4. Add your LAN range to ip/addresses
5. Configure the DHCP server - you can add static addresses - ping to verify
6. Configure firewall/NAT and verify routes are reachable and valid
7. Create a new admin account and disable the default once verified
8. Disable unused services in firewall/services, then restrict the remaining required services (ex.: who needs access to ssh ?)
9. Add basic firewall rules in the forward chain and Fasttrack connections as required/drop invalid-unsolicited traffic - rules are applied from top to bottom - I start with 4 rules before the next steps...
10. Add VLANs, hairpin NAT and port forwarding once the basic config is working (leaving an access port is a good idea...).
11. Add hardening rules to the firewall
12. Only limit bandwidth and use QoS if you have issues. Prioritizing critical devices is a sound strategy...

Probably forgot a few things, but this will get you started.
 
Darj
just joined
Topic Author
Posts: 1
Joined: Thu Oct 05, 2023 11:55 pm

Re: RB4011 network setup for an apartment w/ dedicated server

Mon Oct 16, 2023 6:52 pm

What I end up doing was:
1) Reset the router with the default configuration on
2) Changed ether1 MAC address to the one that ISP requires
3) Changed the default network from 192.168.88.0/24 to my original one - 192.168.1.0/24
4) Changed the DHCP server settings same as above, setting up pool, general settings, etc...
5) Added Static DHCP leases from the previous router
6) Changed the Wireless Network name to the one I was using
7) Plugged the cables accordingly

Everything was working just fine, so it seems I did it properly. The biggest pain in the butt was the fact that I had to add all NAT rules for port forwarding one by one (not being able to multiselect tcp and udp protocol at the same time for one entry), so my port forward list got a bit long lol. I also managed to set up hairpin NAT, so that's good as well. I haven't really do anything with Fasttrack, so my Firewall Filter Rules are basically defaults. So far nobody complained but I think I might need to roll up my sleeves and sit down with the filter rules...
Last edited by Darj on Mon Oct 16, 2023 8:33 pm, edited 1 time in total.
 
Moba
Member Candidate
Member Candidate
Posts: 212
Joined: Sun Sep 27, 2020 6:15 pm

Re: RB4011 network setup for an apartment w/ dedicated server

Tue Oct 17, 2023 12:35 am

Good to know you managed to get things working. Many vulnerabilities on MT concern people who leave WAN access to services and WinBox/Webfig. By changing the default admin account and restricting access to the input chain to your LAN only, you solve most of these potential issues. There are many tutorials on YT covering this, and the default rules are pretty good too.

The default FastTrack rule is meant to reduce CPU load from connections using NAT. But FastTrack is very flexible, because you can restrict its use to specific udp/tcp ports (80, 8080,443, 3478, etc.) or LAN clients by using an address list (as an action in Firewall or Mangle), then queue/limit everything else that may interfere with your essential traffic - like Torrents and troublesome clients. Unless you have issues, I wouldn't bother, but the functionality is there if you ever need it.
 
HalfWolf
just joined
Posts: 2
Joined: Tue Mar 05, 2024 8:28 am

Re: RB4011 network setup for an apartment w/ dedicated server

Tue Mar 12, 2024 8:58 am

Hello there!

I'm new to MikroTik (and advanced networking). I come from a FreshTomato background running on an ASUS router. The network I will be building will be for many apartments. I have couple of devices, including: 3 phones, 3 Raspberry PIs, a PC, 3 Laptops (personal, work and son's), Printer and a dedicated HP server. I've recently got the RB4011 WiFi model and I want to use it as the main router for the whole network.

Currently, the network configuration is relatively simple: ISP <--fiber--> Huawei <--ethernet--> Router <--ethernet/WiFi--> clients. All LAN devices have static DHCP MAC-IP bindings. The server has some ports forwarded for some services to be connectable from the internet. PC and server are the only things connected through the cable, everything else run on WiFi. One of the RPis runs PiHole and is set by FreshTomato's dnsmasq as the main DNS when clients obtain IP from DHCP. Every device, both Ethernet and WiFi are using the same network - 192.168.1.0/24.
One caveat is that my ISP currently allows my ASUS router MAC address (this shouldn't be a problem - I should be able to change the MAC on MikroTik, right?). QoS is disabled because of hardware limitations and I'm getting 300Mbps down instead of the full 750Mbps I should be having. When I turn on CTF I'm getting the full speed, however I can't use QoS then.

What I'm missing right now:
  • QoS + Bandwith Limiting - I'd like to "divide" both upload and download speed so that the requests from/to the server get the highest priority, then work laptop, then my PC, then everything else. The rule of thumb I'd like to use is that 90% of bandwidth is always used across all devices. Ideally I want my server to have high connection speed and low pings for services while I would be working on the laptop, wife watching TV, son play video games with small pings and guests use WiFi without lags/slow downs.
  • No FastTrack/CTF - I have this currently on because that's the only way I'm getting my full internet speed. If I'm understanding this correctly - FT/CTF turned on implies that QoS/Bandwidth Limiting are ignored and I want to have the full bandwidth available for QoS/BW Limit
  • working Hairpin/NAT Loopback - currently the only way I can connect from my PC to the server is to have a LAN IP entry for the domain the server is using in the hosts file. If I'm understanding this correctly - Hairpin NAT would handle that on a network packet level based on some firewall (?) rules
  • Network Flow visualization + monitoring - I'm looking for a way to have some sort of a dashboard with as much details as possible, including: connections displayed on map, drilling down to the network packet level, etc... I can host it on my dedicated server. Any recommendations what open source/free tools I can use for that?
  • Secure and Efficient Firewall w/ server ports forwarded - I understand NAT a little bit but I have no idea about other things like Mangle, Rules etc.. so I can't even really tell if I should consider those or maybe those are required in my case
  • VLANs (?) - I'd want to group some devices and manage those groups in terms of internet connectivity and communication between each other groups, i.e. printer doesn't have to have internet access at all but should be accessible to all LAN devices, work laptop should have internet access and be able to use the network printer but nothing else
  • Ditching Huawei - I might be able to use the SPF+ slot and plug the fiber cable through the connector there but I might have to call the ISP to confirm that the Huawei serves only the purpose of converting fiber to ethernet and I also need to find a proper connector

From what I've already researched, this should be the order of how I should get this all done:
  • Design/Draw network diagram
  • Boot up Mikrotik and remove default configuration
  • Upgrade to the latest version
  • Plug the WAN cable to Eth1 port, Server cable to Eth2 and PC cable to Eth3.
  • Create WAN interface (?), put it the ISP-required MAC address there, create a network of 192.168.1.0/24 (to keep the current addressation) and turn on DHCP with a custom pool
  • Add all the static DHCP leases
  • Create a WiFi Network and it's security profile
  • Setup routing (?)
  • Setup Firewall (QoS, Bandwidth limiting, Port Forwading, other(?))
As I already mentioned, I'm new to MikroTik (and advanced networking). I come from a FreshTomato background running on an ASUS router. The network I will be building will be for many apartments. I have couple of devices, including: 3 phones, 3 Raspberry PIs, a PC, 3 Laptops (personal, work and son's), Printer and a dedicated HP server. I've recently got the RB4011 WiFi model and I want to use it as the main router for the whole network.


If I messed up/overdoing/missing something here, let me know - any help and guidance is much appreciated!
Connect WAN cable to Eth1, Server cable to Eth2, and PC cable to Eth3.
Configure WAN interface with ISP-required MAC, set up LAN DHCP.
Create WiFi network with security profile.
Design network diagram for visualization.
Implement routing for LAN devices.
Configure firewall: disable FastTrack/CTF, set QoS, bandwidth limiting, and port forwarding.
Research tools for network flow visualization and monitoring.
Learn MikroTik firewall components for security.
Explore VLANs for device grouping and management.
Confirm Huawei transition feasibility with ISP.
Follow these steps for a comprehensive MikroTik RB4011 setup. Adjust as needed and seek guidance for specific issues.

Who is online

Users browsing this forum: Amazon [Bot], Kingdres1 and 32 guests