The BrothersWISP, profile picture
The BrothersWISP est sur Facebook. Pour communiquer avec The BrothersWISP, connectez-vous à Facebook.
The BrothersWISP, profile picture
The BrothersWISP est sur Facebook. Pour communiquer avec The BrothersWISP, connectez-vous à Facebook.
The BrothersWISP, profile picture

We know some of you won't do it unless you're spoon-fed the information. Subscribe to notifications to get notified of comments. We'll comment when we make modifications to the config.

It's just something thrown together and likely contains errors and omissions. Read through it and understand it before you just copypasta. You'll have to read because you'll have to change IP blocks, interfaces, port numbers, etc. If you don't use any of the VPNs, remove that particular VPN.

Note that you'll need the web interface open to accept SSTP. The web server has had exploits before, so maybe you don't want to just leave 443 open to the world. Maybe you don't use this and instead add the IP to the whitelist if static or use port-knocking if dynamic.

There's a port-knocking sequence in there as well. TCP 9000, TCP 32000, and then TCP 6000. Each needs to be hit within 10s of the last to open up the firewall for 10h. Check out this post of Greg's helps you figure out how to build an application to manage port knocking on the client's side (and a pre-built one). http://gregsowell.com/?p=2020

There's still the FTP\SSH brute-force scripts in there as a last line of defense in case something in your management networks gets compromised. I'd appreciate some commentary on how to capture winbox, telnet, IPSEC, OpenVPN, etc. brute force attacks as well so we can protect those whitelisted networks\services as much as possible. Unlike brute-force detection you may have done before where the goal was to block and not alert due to the amount of traffic, you'll want to keep your eyes on anything that makes it through this part of the config because it will be a device you trust that's compromised.

/interface list
add name=OSPF
/interface list member
add interface=ether1 list=OSPF
/ip firewall address-list
add address=10.250.250.32/27 comment="Private Management IPs" list=Whitelist
add address=AAA.BBB.CCC.DDD comment=Other-edge-router list=BGP
add address=206.41.110.0/24 comment=United-IX list=BGP
add address=206.53.139.0/24 comment="Midwest-IX Indy" list=BGP
add address=178.248.237.29 comment=QRator list=BGP
add address=EEE.FFF.GGG.HHH comment=Upstream-v4 list=BGP
add address=III.JJJ.KKK.LLL comment=Client list=BGP
add address=38.229.6.20 comment=FULLBOGONS-CYMRU-1-v4 list=BGP
add address=38.229.46.20 comment=FULLBOGONS-CYMRU-2-v4 list=BGP
add address=MMM.NNN.OOO.PPP/27 comment="Public Management IPs" list=Whitelist
/ip firewall filter
add action=accept chain=input comment="Accept Established and Related" connection-state=established,related
add action=accept chain=input comment="Accept BGP Address List" src-address-list=BGP dst-port=179
add action=accept chain=input comment="Accept ICMP" protocol=icmp
add action=drop chain=input comment="drop ssh brute forcers" dst-port=22,23 protocol=tcp src-address-list=ssh_blacklist
add action=drop chain=input comment="drop ftp brute forcers" dst-port=21 protocol=tcp src-address-list=ftp_blacklist
add action=accept chain=input comment="Accept Whitelist" src-address-list=Whitelist
add action=accept chain=input comment=OSPF in-interface-list=OSPF protocol=ospf
add action=accept chain=input comment="OpenVPN" disabled=no dst-port=1194 protocol=tcp
add action=accept chain=input in-interface=ether1 protocol=ipsec-esp comment="allow L2TP VPN (ipsec-esp)"
add action=accept chain=input dst-port=500,1701,4500 in-interface=ether1 protocol=udp comment="allow L2TP VPN (500,4500,1701/udp)"
add chain=input protocol=tcp dst-port=443 action=accept comment="Allow SSTP"
add action=add-src-to-address-list address-list="port:9000" address-list-timeout=10s chain=input dst-port=9000 protocol=tcp
add action=add-src-to-address-list address-list="port:32000" address-list-timeout=10s chain=input dst-port=32000 protocol=tcp src-address-list="port:9000"
add action=add-src-to-address-list address-list="Whitelist" address-list-timeout=10h chain=input dst-port=6000 protocol=tcp src-address-list="port:32000"
add action=accept chain=output content="530 Login incorrect" dst-limit=1/1m,9,dst-address/1m protocol=tcp
add action=add-dst-to-address-list address-list=ftp_blacklist address-list-timeout=3h chain=output content="530 Login incorrect" protocol=tcp
add action=add-src-to-address-list address-list=ssh_blacklist address-list-timeout=1w3d chain=input connection-state=new dst-port=22,23 protocol=tcp src-address-list=ssh_stage3
add action=add-src-to-address-list address-list=ssh_stage3 address-list-timeout=1m chain=input connection-state=new dst-port=22,23 protocol=tcp src-address-list=ssh_stage2
add action=add-src-to-address-list address-list=ssh_stage2 address-list-timeout=1m chain=input connection-state=new dst-port=22,23 protocol=tcp src-address-list=ssh_stage1
add action=add-src-to-address-list address-list=ssh_stage1 address-list-timeout=1m chain=input connection-state=new dst-port=22,23 protocol=tcp
add action=drop chain=input comment="Deny All"

GREGSOWELL.COM

Windows Port Knock Application | Greg Sowell Consulting

This is a known issue with all autoit compiled scripts. They are NOT infected, it’s just that Autoit code has been picked up by virus scanners at one point, and now are forever flagged *sigh*. If you prefer, just simply compile the code below for yourself. If google sees me as having malicious cod...
The BrothersWISP, profile picture
The BrothersWISP
Already modified to include Greg's blog post that I forgot to add in the initial post.
3 ansPlus
Gilbert Artie Darrell, profile picture
Gilbert Artie Darrell
Are people using port knocking instead of ssh keys? As a secure but more convenient alternative?

3 ansPlus
The BrothersWISP, profile picture
The BrothersWISP
Also, SSH keys only apply to SSH.
2 ansPlus
Sean Scarfo, profile picture
Sean Scarfo
"last to open up the firewall for 10h" Isn't 10 hours a bit much... once you establish a connection, established/related connections stay open until you disconnect. I use port knocking a lot, and only open it up for about 15minutes, which is more than enough time to establish a vpn or access plex etc.

KnockD on ios works great as a port knocker.
3 ansPlus
Pages aimées par la Page
1,1 K aime ça
The InfraGard National Members Alliance is a non-profit association that partners with the Federal…
1,6 K aime ça
Baltic Networks, founded in 2005, is a global value-added distributor of broadband telecommunication…
162 aime ça
MapItRight is a fiber plant design solution.
Publication récente de la Page
The BrothersWISP, profile picture

If you're having issues with particular websites, apps, CDNs, services, etc. thinking your customers are behind a VPN or in a different geography than they really are, take a look at this page, specifically built to help with these kinds of issues.
http://thebrotherswisp.com/index.php/geo-and-vpn/

Alex Comerford, profile picture
Alex Comerford
I’d add ‘remember the MTU if you’re using a VPN’
17 hPlus
The BrothersWISP, profile picture

Have any of you tried the new MikroTik Home app yet? https://youtu.be/ALo0ISzz4IA

Marius Prinsloo, profile picture
Marius Prinsloo
Is it a requirement to have nails like the host in YT to use the app ?

ven.Plus
The BrothersWISP, profile picture

TIL: You can only try setting up a specific site on Let's Encrypt 10 times before they lock you out for a week.

Pages associées
1,4 K aime ça
IP ArchiTechs is a multi-vendor network design and consulting firm that provide scalable…
3,6 M aime ça
Find what you need by getting the latest information on businesses, including grocery stores,…
507 aime ça
Internet Peering, IP BGP, #keeptrafficlocal
Voir plus