Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
thebigcow
Jan 3, 2001

Bully!

PUBLIC TOILET posted:

I should have noted that both routers are running v5.26. Isn't the cloud feature in version 6+?

Yes. Its a free dynamic dns thingy that's baked in.

Adbot
ADBOT LOVES YOU

PUBLIC TOILET
Jun 13, 2009

jeeves posted:

Just upgrade to 6.27 unless the license on your Mikrotik won't let you.

Also, you can impliment an IP firewall list that only allows SSH connections from your whitelist. We do that at work since China is always banging away at SSH connections unless we whitelist, whereas the Winbox service gets only like 1-2 attempts a month.
code:
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set api disabled=yes
set api-ssl disabled=yes

/ip firewall address-list
add address=X.X.X.X/24 comment="Whitelisted IPs" list=whitelist
add address=X.X.X.Y/24 comment="Whitelisted IPs" list=whitelist

/ip firewall filter
add action=reject chain=input comment="Reject SSH connections from IPs not on whitelist" dst-port=22 protocol=tcp \
    reject-with=icmp-host-prohibited src-address-list=!whitelist
The above will close anything but Winbox (any IP) and also SSH (only from your whitelisted ips). You can do a similar whitelist for the Winbox port or just turn off the winbox service if you want to lock it down further.

I like this idea. I might even try it on my router and remove the existing SSH firewall rule. The only thing I'm not sure about is how/where to start a whitelist for this. I looked around online but most of the information I see is how to create whitelists for a web proxy.

jeeves
May 27, 2001

Deranged Psychopathic
Butler Extraordinaire

PUBLIC TOILET posted:

I like this idea. I might even try it on my router and remove the existing SSH firewall rule. The only thing I'm not sure about is how/where to start a whitelist for this. I looked around online but most of the information I see is how to create whitelists for a web proxy.

What questions about the whitelist do you have? Basically take your home IP, and add it to "/ip firewall address-list", and tag it with the name 'whitelist' (or anything). Then, when you make the firewall rule, the src-address-list=!whitelist command tells it to apply to any IP that is NOT on that 'whitelist' name you made before.

Or instead of making a whitelist like that, you can just use one IP in the firewall filter, however that may lock you out eventually or such if you screw up or if your IP changes.

PUBLIC TOILET
Jun 13, 2009

jeeves posted:

What questions about the whitelist do you have? Basically take your home IP, and add it to "/ip firewall address-list", and tag it with the name 'whitelist' (or anything). Then, when you make the firewall rule, the src-address-list=!whitelist command tells it to apply to any IP that is NOT on that 'whitelist' name you made before.

Or instead of making a whitelist like that, you can just use one IP in the firewall filter, however that may lock you out eventually or such if you screw up or if your IP changes.

Okay, thank you. I had a feeling it was the "Address Lists" option in Winbox under Firewall but I wasn't sure because I had never used that feature before. I wanted to confirm in my head where everything would appear within the Winbox interface once I thought about each command that jeeves had mentioned.

Wouldn't I also have to build another firewall rule that forwards destination port 8291 from the WAN to the router's IP address? And also build a NAT rule for it?

PUBLIC TOILET fucked around with this message at 04:24 on Mar 21, 2015

The_Franz
Aug 8, 2003

PUBLIC TOILET posted:

Okay, thank you. I had a feeling it was the "Address Lists" option in Winbox under Firewall but I wasn't sure because I had never used that feature before. I wanted to confirm in my head where everything would appear within the Winbox interface once I thought about each command that jeeves had mentioned.

Wouldn't I also have to build another firewall rule that forwards destination port 8291 from the WAN to the router's IP address? And also build a NAT rule for it?

No. The input firewall chain is for traffic going from the internet to the router itself. The forward chain is for traffic passing through the router (i.e. internet to LAN). Since traffic to the router is never going through NAT or being passed through to the LAN you just need the rule in the input chain.

PUBLIC TOILET
Jun 13, 2009

The_Franz posted:

No. The input firewall chain is for traffic going from the internet to the router itself. The forward chain is for traffic passing through the router (i.e. internet to LAN). Since traffic to the router is never going through NAT or being passed through to the LAN you just need the rule in the input chain.

Thank you for the clarification.

One other, unrelated issue. I'm working to configure a task in the scheduler where it will perform a "/system reboot" once a week at 6am. The time I entered was one week at 06:00 hours (because I figure it's measured in military time on the router.) I've been noticing that the router will instead reboot at around 12am. I checked the clock settings and they're set to New York/-4 GMT, but I think the current time is incorrect. I have Google's NTP servers specified for synchronization (time1.google.com/time2.google.com via IP address.) If I have NTP servers specified, should I then set the clock section to "manual" instead of New York/-4 GMT? Not sure why the clock is off but I don't know if it's a mis-configuration in my router, or if it's the fault of the Google NTP servers.

thebigcow
Jan 3, 2001

Bully!
When you say "I think the current time is incorrect" what do you mean?

PUBLIC TOILET
Jun 13, 2009

thebigcow posted:

When you say "I think the current time is incorrect" what do you mean?

When I look at the clock settings, it shows me the current time in 24h format, but I'm pretty sure it's not the correct eastern time it should be. I would double-check via winbox but I can't at the moment because I apparently did not whitelist the correct IP address for remote access. I can however provide you with the configuration I currently have:

code:
/system clock
set time-zone-name=America/New_York

/system ntp client
set enabled=yes mode=unicast primary-ntp=216.239.32.15 secondary-ntp=\
    216.239.34.15

jeeves
May 27, 2001

Deranged Psychopathic
Butler Extraordinaire
"/system clock print" will give you the current read out of what time your Mikrotik thinks it is.

code:
[admin@TEST.CANARY] /system clock print
                  time: 12:11:41
                  date: mar/23/2015
  time-zone-autodetect: no
        time-zone-name: PST8PDT
            gmt-offset: -07:00
            dst-active: yes
While "/system ntp client print" will give you a heads up to NTP status / last sync time (edited my company's NTP IPs out):

code:
[admin@Test.CANARY] /system ntp client> print
                 enabled: yes
             primary-ntp: X.X.X.91
           secondary-ntp: X.X.X.13
        server-dns-names: 
                    mode: unicast
           poll-interval: 15m
           active-server: X.X.X.91
        last-update-from: X.X.X.91
      last-update-before: 9m46s150ms
         last-adjustment: 7ms265us
    last-bad-packet-from: X.X.X.194
  last-bad-packet-before: 1h20m17s490ms
  last-bad-packet-reason: bad-packet-length

jeeves fucked around with this message at 20:15 on Mar 23, 2015

PUBLIC TOILET
Jun 13, 2009

Here's what I have:

code:
[admin@MikroTik] /system scheduler> /system clock print
            time: 18:06:12
            date: mar/23/2015
  time-zone-name: America/New_York
      gmt-offset: -04:00
      dst-active: yes
[admin@MikroTik] /system scheduler> /system scheduler print
Flags: X - disabled 
 #   NAME   START-DATE  START-TIME   INTERVAL             ON-EVENT    RUN-COUNT
 0   ;;; Reboot router (daily)
     sch... jan/01/1970 00:06:00     1d                   /system...          0
[admin@MikroTik] /system scheduler> /system ntp client print
             enabled: yes
                mode: unicast
         primary-ntp: 216.239.32.15
       secondary-ntp: 216.239.34.15
       poll-interval: 15m
       active-server: 216.239.34.15
    last-update-from: 216.239.34.15
  last-update-before: 12m49s380ms
     last-adjustment: 7ms816us
So right now the current time looks correct (18 = 6pm Eastern). It says DST is active so it's set to -4 GMT which I think is correct. Would the start date in the scheduler be throwing it off and causing it to reboot around 12am instead of 6am?

edit: it should read as 06:00:00 shouldn't it?

edit 2: yeah, that was it. i'm an idiot.

PUBLIC TOILET fucked around with this message at 23:20 on Mar 23, 2015

jeeves
May 27, 2001

Deranged Psychopathic
Butler Extraordinaire
Scheduler is weird. If you have it set to a specific time you have to set it to a future date or else it won't even run-- which I guess makes sense but it kind of weird.

Here's my code I did to upgrade the RouterOS + Router firmware late at night when hopefully some people arn't using it:

code:
/system scheduler
add name=#1-RebootSoftware comment="Reboot for software upgrade" on-event="/system reboot"\
	policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive \
	start-date=feb/11/2015 start-time=03:36:00

add name=#2-UpdateFirmware comment="Update firmware" on-event="/system router upgrade" \
	policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive \
	start-date=feb/11/2015 start-time=03:37:30

add name=#3-RebootFirmware comment="Reboot after firmware upgrade" on-event="/system reboot" \
	policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive \
	start-date=feb/11/2015 start-time=03:42:00

add name=#4-DeleteSchedulers comment="Delete software update schedulers" \
	on-event="/system scheduler remove #1-RebootSoftware,#2-UpdateFirmware,#3-RebootFirmware,#4-DeleteSchedulers" \
	policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive \
	start-date=feb/11/2015 start-time=03:44:00
Note I last updated that on 2015-02-15 so if I copy and pasted that into it now it wouldn't work since the start date is already past. You have to have a start date of something in the future for it to recognize it needs to DO it. Like a 'DO IT NOW DATE' and not just 'start anytime after this date' date.

Edit - I had manually downloaded the router package upgrade and left it in the files folder of the router, it was just waiting for the initial reboot. That's why step #1 is a reboot.

Mr. Clark2
Sep 17, 2003

Rocco sez: Oh man, what a bummer. Woof.

Warning: crude network diagram and noobish question ahead. I'm still learning 'intermediate' networking concepts, so please bear with me.

I purchased a RB750GL (arriving Wednesday) to replace a Netgear FVS318g on my home network. Since installing the GVS318, my download speeds have dropped from 50mb to 12mb. I remove it and they go back to the 50mb I'm paying for, so obviously it's a bottleneck and needs to go.
For security reasons, I would like to separate my wired clients (4) and my wireless clients (8-12 at any time).
Here is a diagram of what I'm hoping to achieve:


I would like to make it so no traffic passes between the wired and wireless clients, while still allowing both of these groups to access the internet. Do I need to use vlans to accomplish this? If so, is the dumb switch (Dlink dgs-108) going to be a problem? Thanks for any help you can provide and let me know if you need any more info.

*edit* AEBS = Airport Extreme Basestation. Just to be clear

thebigcow
Jan 3, 2001

Bully!

Mr. Clark2 posted:

Warning: crude network diagram and noobish question ahead. I'm still learning 'intermediate' networking concepts, so please bear with me.

I purchased a RB750GL (arriving Wednesday) to replace a Netgear FVS318g on my home network. Since installing the GVS318, my download speeds have dropped from 50mb to 12mb. I remove it and they go back to the 50mb I'm paying for, so obviously it's a bottleneck and needs to go.
For security reasons, I would like to separate my wired clients (4) and my wireless clients (8-12 at any time).
Here is a diagram of what I'm hoping to achieve:


I would like to make it so no traffic passes between the wired and wireless clients, while still allowing both of these groups to access the internet. Do I need to use vlans to accomplish this? If so, is the dumb switch (Dlink dgs-108) going to be a problem? Thanks for any help you can provide and let me know if you need any more info.

*edit* AEBS = Airport Extreme Basestation. Just to be clear

AFAIK you can go into interfaces, then whichever port you plugged the airport into, and change its master port to none to remove it from the switch chip and have everything done in software. Use port five to make things a little easier. Then you'll need to change firewall rules, give it an address on a different network, etc. Make a backup before you start fussing :)

jeeves
May 27, 2001

Deranged Psychopathic
Butler Extraordinaire
Add 192.168.2.1/24 to ether2, then add 192.168.1.1/24 to ether3. Then slave ether4 and ether5 to master port ether3.

You can do all of that without needing a dumb switch, and the two networks will not see each other due to two separate gateways/subnets.

In /ip firewall nat, add a nat statement to make 192.168.1.1 and 192.168.2.1 see the WAN IP on ether1.

jeeves fucked around with this message at 04:40 on Mar 24, 2015

Mr. Clark2
Sep 17, 2003

Rocco sez: Oh man, what a bummer. Woof.

The switch is in there because the room where all the wired clients are located only has one wall jack for ethernet. I rent so it's impossible to run cabling into the room, so the switch has to stay.

PUBLIC TOILET
Jun 13, 2009

So I'm not sure why but even after creating the whitelist and adding the appropriate IP address, attempting to connect to my router via winbox from one of the whitelisted IP addresses is being blocked. Below is a screen capture of the log:



And here's what my firewall configuration looks like:

code:
/ip firewall address-list
add address=76.180.60.40 comment="Whitelisted IP addresses" disabled=no list=whitelist
add address=x.x.x.x disabled=no list=whitelist
/ip firewall connection tracking
set enabled=yes generic-timeout=10m icmp-timeout=10s tcp-close-timeout=10s tcp-close-wait-timeout=10s tcp-established-timeout=1d tcp-fin-wait-timeout=10s \
    tcp-last-ack-timeout=10s tcp-syn-received-timeout=5s tcp-syn-sent-timeout=5s tcp-syncookie=no tcp-time-wait-timeout=10s udp-stream-timeout=3m \
    udp-timeout=10s
/ip firewall filter
add action=accept chain=input connection-state=established disabled=no
add action=accept chain=input connection-state=related disabled=no
add action=accept chain=forward connection-state=established disabled=no
add action=accept chain=forward connection-state=related disabled=no
add action=accept chain=input comment="Allow all traffic from LAN" disabled=no in-interface=bridge-local
add action=accept chain=input comment="Rate-limit pings" disabled=no limit=50/5s,2 protocol=icmp
add action=accept chain=forward comment="Allow outgoing TCP traffic from LAN" connection-state=new disabled=no in-interface=bridge-local protocol=tcp \
    tcp-flags=syn,!ack
add action=accept chain=forward comment="Allow outgoing UDP traffic from LAN" connection-state=new disabled=no in-interface=bridge-local protocol=udp
add action=accept chain=forward comment="Allow outgoing pings from LAN" connection-state=new disabled=no icmp-options=8:0-255 in-interface=bridge-local \
    protocol=icmp
add action=accept chain=forward comment="Allow HTTPS/RWW (SERVER)" connection-state=new disabled=no dst-address=192.168.88.200 dst-port=443,4125 \
    in-interface=ether1-gateway protocol=tcp tcp-flags=syn,!ack
add action=log chain=input comment="Log everything else" disabled=no log-prefix="DROP INPUT"
add action=drop chain=input disabled=no
add action=log chain=forward comment="Log everything else" disabled=no log-prefix="DROP FORWARD"
add action=drop chain=forward disabled=no
add action=reject chain=input comment="Reject Winbox connections from IP addresses not on whitelist" disabled=no dst-port=8291 protocol=tcp reject-with=\
    icmp-host-prohibited src-address-list=!whitelist
/ip firewall nat
add action=masquerade chain=srcnat comment="default configuration" disabled=no out-interface=ether1-gateway to-addresses=0.0.0.0
add action=dst-nat chain=dstnat comment="Remote Web Access HTTPS/RWW (SERVER)" disabled=no dst-port=443,4125 in-interface=ether1-gateway protocol=tcp \
    src-address=!192.168.88.0/24 to-addresses=192.168.88.200
/ip firewall service-port
set ftp disabled=no ports=21
set tftp disabled=no ports=69
set irc disabled=no ports=6667
set h323 disabled=no
set sip disabled=no ports=5060,5061 sip-direct-media=yes
set pptp disabled=no
I changed the IP to "x.x.x.x", the actual IP is specified in the firewall configuration. Even if I have the IP whitelisted, the firewall is still dropping the connection attempt from the IP address. The winbox service is running on the router listening on port 8291. I even tried to create a dst-nat rule to forward directly to 192.168.88.1 but it made no difference.

PUBLIC TOILET fucked around with this message at 02:28 on Mar 25, 2015

The_Franz
Aug 8, 2003

Packets hit rules in the order they are listed so you need to put your Winbox rule above the "drop everything" rule or the packet will be dropped before it hits the Winbox rule. You also need to have your Winbox rule accept whitelisted connections instead of dropping non-whitelisted connections or allowed packets will just fall through to the drop rule.

PUBLIC TOILET
Jun 13, 2009

The_Franz posted:

Packets hit rules in the order they are listed so you need to put your Winbox rule above the "drop everything" rule or the packet will be dropped before it hits the Winbox rule. You also need to have your Winbox rule accept whitelisted connections instead of dropping non-whitelisted connections or allowed packets will just fall through to the drop rule.

Holy poo poo it works! Thanks everyone!

jeeves
May 27, 2001

Deranged Psychopathic
Butler Extraordinaire

PUBLIC TOILET posted:

Holy poo poo it works! Thanks everyone!

Yeah, I always forget that aspect of firewall filters because when I code them I always put them in order from the start. Of course I do so few filters on there (I just do the whitelist filters on initial installs, we have another guy who does followup filters) that I forget about the drag-and-drop aspect of the order.

Good to hear you got it working. Mikrotiks are great for home once you understand them.

PUBLIC TOILET
Jun 13, 2009

jeeves posted:

Yeah, I always forget that aspect of firewall filters because when I code them I always put them in order from the start. Of course I do so few filters on there (I just do the whitelist filters on initial installs, we have another guy who does followup filters) that I forget about the drag-and-drop aspect of the order.

Good to hear you got it working. Mikrotiks are great for home once you understand them.

I've been quickly researching MikroTik books on Amazon to learn more about them. Any recommendations?

jeeves
May 27, 2001

Deranged Psychopathic
Butler Extraordinaire

PUBLIC TOILET posted:

I've been quickly researching MikroTik books on Amazon to learn more about them. Any recommendations?

I've picked up just from work. I use them mostly as layer 3 switches, and for them to do basic routing and very basic VLANs. We have a master router that is a very beefy non-Mikrotik Vyatta that does all of the heavy lifting like OSPF and BGP, but the Mikrotiks are all the lower end stuff on remote sites and such.

I can't recommend much, but I can post a few example scripts of some of the basic stuff I do at work once I take out the public IPs. I try to comment up my stuff really well.

Mr. Clark2
Sep 17, 2003

Rocco sez: Oh man, what a bummer. Woof.

So...what exactly does it mean when a port is "slaved" to another port? I'm guessing that changes I make to the master interface will also be applied to the slaved interfaces? I'm going through the documentation but some of the English is...not so good (but still better than my Latvian).

jeeves
May 27, 2001

Deranged Psychopathic
Butler Extraordinaire
I sanitized one of my work's RB750GL configs that we use as a canary unit to see if power fails at a remote site and also as a basic DHCP router.

WAN IP would be 1.1.1.100, with a gateway of 1.1.1.1

code:
### Test-DHCP (RB750G)
### ether1 = Uplink: 1.1.1.100/24, GW: 1.1.1.1
### ether2-ether5 = Test DHCP block: 192.168.100.1/24 [192.168.100.50-.254 usable]

### Initial system configuration

# Initial configuration #1/6: Set system identity
/system identity set name="Test-DHCP"

# Initial configuration #2/6: Disable unused services
/ip service 
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set www-ssl disabled=yes
set api disabled=yes
set api-ssl disabled=yes

# Initial configuration #3/6: Set the time using NTP
#/system ntp client set enabled=yes primary-ntp=#NTPSERVER1# secondary-ntp=#NTPSERVER2#
/system clock set time-zone-name=PST8PDT
/system clock manual set time-zone=-08:00

# Initial configuration #4/6: Set internal DNS for the router
/ip dns set servers=8.8.8.8,4.2.2.2 allow-remote-requests=no

# Initial configuration #5/6: Set SNMP reporting
/snmp community set [ find default=yes ] name=test_public
/snmp set contact=snmpcontact@snmp.com enabled=yes location="Test" trap-community=test_public

# Initial configuration #6/6: Change the LCD touch screen's PIN for CRS/CRR
# Unused due to RB750
#/lcd pin set hide-pin-number=yes pin-number=1234

# SSH firewall #1/2: create an ACL/whitelist of approved IPs
/ip firewall address-list
add address=69.69.69.1/24 list=whitelist comment="Whitelisted IPs"
add address=1.1.1.1/24 list=whitelist comment="Whitelisted IPs"

# SSH firewall #2/2: block all SSH connections from IPs not on the above whitelist
/ip firewall filter
add action=reject chain=input dst-port=22 protocol=tcp reject-with=icmp-host-prohibited src-address-list=!whitelist \
	comment="Reject SSH connections from IPs not on whitelist"


### ether1 = Uplink: 1.1.1.100/24, GW: 1.1.1.1
# Uplink to WAN #1/2: add IP address to ether1 for uplink to WAN
/ip address add address=1.1.1.100/24 interface=ether1 comment="Uplink"

# Uplink to WAN #2/3: add WAN route for the upstream gateway
/ip route
add dst-address=0.0.0.0/0 gateway=1.1.1.1 comment="Uplink"

# Uplink to WAN #3/3: add comment to identify the interface
/interface ethernet set ether1 comment="Uplink"


### ether2-ether5 = Test DHCP block: 192.168.100.1/24 [192.168.100.50-.254 usable]
# DHCP block #1/8: set up a bridge group for the DHCP block
/interface bridge 
add name=Test-LAN comment="Test DHCP block (ether2-ether5)"

# DHCP block #2/8: assign ether2-ether5 to the above bridge group
/interface bridge port
add bridge=Test-LAN interface=ether2
add bridge=Test-LAN interface=ether3
add bridge=Test-LAN interface=ether4
add bridge=Test-LAN interface=ether5
/interface ethernet set ether2,ether3,ether4,ether5 comment="Test DHCP"

# DHCP block #3/8: add an IP address to bridge Test-LAN (ether2-ether5)
/ip address
add address=192.168.100.1/24 interface=Test-LAN comment="Test DHCP block"

# DHCP block #4/8: create a pool of addresses for the DHCP to assign from
/ip pool
add name=Test-DHCPpool ranges=192.168.100.5-192.168.100.254

# DHCP block #5/8: create a DHCP server on bridge Test-LAN using Test-DHCPpool's addresses
/ip dhcp-server
add name=Test-DHCP interface=Test-LAN address-pool=Test-DHCPpool lease-time=23h29m disabled=no

# DHCP block #6/8: configure the network, gateway, and DNS addresses for the DHCP
/ip dhcp-server network
add address=192.168.100.0/24 gateway=192.168.100.1 dns-server=8.8.8.8,4.2.2.2

# DHCP block #7/8: add Default DHCP configuration firewall rules (these are Mikrotik defaults and may be optional)
/ip firewall filter
add chain=forward connection-state=established comment="Default configuration for DHCP" 
add chain=forward connection-state=related comment="Default configuration for DHCP" 
add action=drop chain=forward connection-state=invalid comment="Default configuration for DHCP" 

# DHCP block #8/8: add firewall rule allowing the DHCP network to be forwarded out the upstream port (IP address on ether1)
/ip firewall nat
add chain=srcnat action=src-nat src-address=192.168.100.0/24 to-addresses=1.1.1.100


### Password ###

# Set a password via this
/password
If you did a full system-reset without defaults (revert to blank slate), then MAC-address console ported in via Winbox, you should be able to copy and paste the entire above onto an 5 port RB750 (or anything Mikrotik with RouterOS and 5+ ports) and the above would turn it into a DHCP server.

Edit - alternatively, if you want to make this into a 5 port switch that has a managed IP address:
code:
### Test-SWITCH (RB750G)
### ether1 = Uplink:1.1.1.100/24, GW: 1.1.1.1
### ether2-ether5 = Switched/slaved to master port ether1

### Initial system configuration

# Initial configuration #1/6: Set system identity
/system identity set name="Test-SWITCH"

# Initial configuration #2/6: Disable unused services
/ip service 
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set www-ssl disabled=yes
set api disabled=yes
set api-ssl disabled=yes

# Initial configuration #3/6: Set the time using NTP
#/system ntp client set enabled=yes primary-ntp=#NTPSERVER1# secondary-ntp=#NTPSERVER2#
/system clock set time-zone-name=PST8PDT
/system clock manual set time-zone=-08:00

# Initial configuration #4/6: Set internal DNS for the router
/ip dns set servers=8.8.8.8,4.2.2.2 allow-remote-requests=no

# Initial configuration #5/6: Set SNMP reporting
/snmp community set [ find default=yes ] name=test_public
/snmp set contact=snmpcontact@snmp.com enabled=yes location="Test" trap-community=test_public

# Initial configuration #6/6: Change the LCD touch screen's PIN for CRS/CRR
# Unused due to RB750
#/lcd pin set hide-pin-number=yes pin-number=1234

# SSH firewall #1/2: create an ACL/whitelist of approved IPs
/ip firewall address-list
add address=69.69.69.1/24 list=whitelist comment="Whitelisted IPs"
add address=1.1.1.1/24 list=whitelist comment="Whitelisted IPs"

# SSH firewall #2/2: block all SSH connections from IPs not on the above whitelist
/ip firewall filter
add action=reject chain=input dst-port=22 protocol=tcp reject-with=icmp-host-prohibited src-address-list=!whitelist \
	comment="Reject SSH connections from IPs not on whitelist"


### ether1 = Uplink: 1.1.1.100/24, GW: 1.1.1.1
# Uplink to WAN #1/2: add IP address to ether1 for uplink to WAN
/ip address add address=1.1.1.100/24 interface=ether1 comment="Uplink"

# Uplink to WAN #2/3: add WAN route for the upstream gateway
/ip route
add dst-address=0.0.0.0/0 gateway=1.1.1.1 comment="Uplink"

# Uplink to WAN #3/3: add comment to identify the interface
/interface ethernet set ether1 comment="Uplink"


### ether2-ether5 = Switched/slaved to master port ether1
/interface ethernet
set ether2,ether3,ether4,ether5 master-port=ether1


### Password ###

# Set a password here
/password

Note the only thing to change is the ether2-ether5 part. Instead of a DHCP server, it is now just switched to master port of ether1.

Granted, you could put all of your switch code onto ether2 and then just slave/switch ether3-5 to ether2, but I think that's a bit more messy than doing software routing via a bridge group (Test-LAN in the above). The switch chip may be quicker, but you can do more firewall rules right on the bridge group if you want to.

You may want to factory reset a Mikrotik and look at the defaults they put in, as I think they usually do the switch-chip DHCP by default too. And don't forget you can use the 'export' command at any 'directory' to get only the results of what the code would look like at a certain place, and then use the 'print' command to see what the current running status of that area is.

jeeves fucked around with this message at 21:33 on Mar 26, 2015

The_Franz
Aug 8, 2003

Mr. Clark2 posted:

So...what exactly does it mean when a port is "slaved" to another port? I'm guessing that changes I make to the master interface will also be applied to the slaved interfaces? I'm going through the documentation but some of the English is...not so good (but still better than my Latvian).

It means they act as ports on a switch instead of being handled individually by the software. The master port is then what you specify when you want to communicate with all of the slave ports in the switch group.

You can only slave ports to a master if they are physically connected to the same switch chip.

jeeves
May 27, 2001

Deranged Psychopathic
Butler Extraordinaire

The_Franz posted:

It means they act as ports on a switch instead of being handled individually by the software. The master port is then what you specify when you want to communicate with all of the slave ports in the switch group.

You can only slave ports to a master if they are physically connected to the same switch chip.

Yeah, CloudCoreRouter (CCR) units don't allow for slaving, since there is no switch chip. They're a full router and not a Layer3 switch like the CloudSwitchRouters (CRS) are.

This means you can't do VLANs on it which require "/interface ethernet switch vlan" code on CCR units whereas on CRS you can. Little RB750 guys have a switch chip even though they are labeled as routers.

PUBLIC TOILET
Jun 13, 2009

Is there a write-up somewhere of what the new features are in RouterOS v6 compared to v5 aside from the changelog?

jeeves
May 27, 2001

Deranged Psychopathic
Butler Extraordinaire

PUBLIC TOILET posted:

Is there a write-up somewhere of what the new features are in RouterOS v6 compared to v5 aside from the changelog?

Not really, but to be honest there isn't really a reason to stick with v5. They don't do bug patches for old versions or such, once they started v6 they stopped doing all updates to v5 I think.

Prescription Combs
Apr 20, 2005
   6
So I have an RB2011 sitting around that I've been messing with. My background is mostly Cisco with some dabbling in ZyXEL.

Trying to set it up via CLI is whaaaack compared to cisco.

jeeves
May 27, 2001

Deranged Psychopathic
Butler Extraordinaire

Prescription Combs posted:

So I have an RB2011 sitting around that I've been messing with. My background is mostly Cisco with some dabbling in ZyXEL.

Trying to set it up via CLI is whaaaack compared to cisco.

I find that it is really Cisco that is wack but it's just been so dominant for the decades that people are used to wackedness and anything else seems non-normal.

I mean no shutdown? Really? gently caress you Cisco.

The Linux-y nature of Mikrotik is actually pretty easy to pick up compared to Cisco stuff, mostly because it was made most likely as a reaction to Cisco.

Thanks Ants
May 21, 2004

#essereFerrari


Junos :love:

Prescription Combs
Apr 20, 2005
   6
Finally got router on a stick working on a trunk to a managed switch with a handful of vlans. :woop:

jeeves posted:

I find that it is really Cisco that is wack but it's just been so dominant for the decades that people are used to wackedness and anything else seems non-normal.

I mean no shutdown? Really? gently caress you Cisco.

The Linux-y nature of Mikrotik is actually pretty easy to pick up compared to Cisco stuff, mostly because it was made most likely as a reaction to Cisco.


I'll admit it is MUCH easier to pick up. I'm digging it now that I'm starting to wrap my brain around the config structure/nuances.

PUBLIC TOILET
Jun 13, 2009

Out of curiosity, is anyone using LTE for fail-over on their MikroTik routers? Looking at the supported LTE cards, but I'm not sure if anyone has specific recommendations. I'm thinking in my area the best LTE coverage is likely Verizon or T-Mobile. Is this functionality difficult to configure in RouterOS? I also see some of these devices were tested on certain RouterOS revisions.

Atreus
Sep 20, 2005
So kind of unrelated to the RouterOS but moreso on the hardware, I was hoping to get an idea or best cost to link up two houses that are about 150ft apart with LOS. Is it as simple as getting two SXT2Lites and pointing them at each other for the physical aspect? Don't wanna blow money on something that might not work when it first gets cranked up.

originalnickname
Mar 9, 2005

tree

Atreus posted:

So kind of unrelated to the RouterOS but moreso on the hardware, I was hoping to get an idea or best cost to link up two houses that are about 150ft apart with LOS. Is it as simple as getting two SXT2Lites and pointing them at each other for the physical aspect? Don't wanna blow money on something that might not work when it first gets cranked up.

I was going to give this a try with my LOS network I'm going to set up, they look to be about 100 dollars each and that throughput seems pretty incredible. I'd assume you'd get pretty much the maximum rated with only 150 feet to span.

https://www.ubnt.com/airmax/nanobeam-ac/

Thanks Ants
May 21, 2004

#essereFerrari


That's a tiny gap - make sure you take into account the fresnel zone when calculating line of site, there's a nice tool on the Proxim website for working out the height that you need to get each antenna at. For 150ft though it's going to be tiny.

A pair of NanoStation M5 Locos will be more than good enough, and you will have to turn the Tx on each down a lot. If you need more than 100 Mbps of real throughput then look at the ACs ^

Atreus
Sep 20, 2005
My experience has been with the Mikrotik routers and I have set them up at home. Checking out the Nanobeam loco either M5 or M2, and look like good products at a good price. Fresnel zone might be difficult to deal with if that's the case. Is it possible to get a different device for a smaller span or has a larger spread? Or am I worrying about nothing?

jeeves
May 27, 2001

Deranged Psychopathic
Butler Extraordinaire
Unrelatedly, I have really been impressed with the Cloud Core 1009. My work has been using the poo poo out of dozens of CRS125 units, but their CPU just isn't good enough to do much more than switching (they are just L3 switches). That's fine for VLAN switching stuff, but where we need actual routing done it is just starting to not cut it. The RB750 units have pretty much the same CPU as the CRS, and until recently they've only had the $1000 model CCR 1036 which was pretty over kill for us.

The CCR1009 is only like $420 but also has a switch chip on 4 ports too, and an SFP+ along with SFP. It's really nice for a mid-end beefy router, seeing how the 9x1.2Ghz CPU and 2GB of ram is miles above the CRS/RB750's 600mhz CPU and 128mb of ram.

I kind of wish we could go back and sell our like 5-6 CCR1036 units we bought in the last year before the CCR1009 came out. We really don't need much at our remote sites than this new unit.

Methylethylaldehyde
Oct 23, 2004

BAKA BAKA

jeeves posted:

The CCR1009 is only like $420 but also has a switch chip on 4 ports too, and an SFP+ along with SFP. It's really nice for a mid-end beefy router, seeing how the 9x1.2Ghz CPU and 2GB of ram is miles above the CRS/RB750's 600mhz CPU and 128mb of ram

I got a CCR1009 for my home network after my poor little RB493G ended up sitting at 100% CPU usage while trying to push ~100mb/sec of traffic with some packet tagging and routing rules. Same rules, same tagging, 250mb/sec stream, CPU sits at ~8% or so. Thing is a loving beast. And now that glorious latvian engineering has a chance to unbork all the things they messed up with the tile chipset, they're remarkably stable.

CuddleChunks
Sep 18, 2004

Atreus posted:

My experience has been with the Mikrotik routers and I have set them up at home. Checking out the Nanobeam loco either M5 or M2, and look like good products at a good price. Fresnel zone might be difficult to deal with if that's the case. Is it possible to get a different device for a smaller span or has a larger spread? Or am I worrying about nothing?

The ubiquiti gear is solid. I'd recommend you go for a pair of those itty bitty nanostation loco M5's. We use loads of them here at work and they are good gear.

Adbot
ADBOT LOVES YOU

thebigcow
Jan 3, 2001

Bully!

Methylethylaldehyde posted:

I got a CCR1009 for my home network after my poor little RB493G ended up sitting at 100% CPU usage while trying to push ~100mb/sec of traffic with some packet tagging and routing rules. Same rules, same tagging, 250mb/sec stream, CPU sits at ~8% or so. Thing is a loving beast. And now that glorious latvian engineering has a chance to unbork all the things they messed up with the tile chipset, they're remarkably stable.

How many things are still limited to one core? Other than general Latvian quirks that seems to be most of the bitching about Tilera based models on their forums.

I thought they were going to abandon PowerPC but then the RB850Gx2 came out. Also Normis said the new RB3011 was based on this and I have no idea what it is.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply