Community discussions

MikroTik App
 
ezrollin
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 52
Joined: Mon Jul 28, 2014 8:04 am

Clear text config files (from a Cisco world)

Mon Jul 28, 2014 8:24 am

Hi,
I'm a CCNA again and my CCIE friend recommended this company to me so I got the RB2011UiAS-2HnD
for my home network.

My MikroTik is etherneted to my ISP DSL gateway (which also has a WEP active - I enabled MAC filtering). The ISP DSL gateway only connects TVs to netflix so I'm not worried about it.

It seems like there is not enough security between the 2 routers?

So my fast MikroTik that the PCs are behind (WPA2 PSK), I want to set up IDS/IPS.
In the Cisco world I could easily type "show running-config" or "show startup-config" and copy/paste to the config file,TFTP, save it as a backup clear text file, etc.

How do I get my MikroTik backup file (if its clear text)?
I want to copy/paste firewall rules from http://wiki.mikrotik.com/wiki/Firewall
but Putty, Terminal, etc are having paste issues.
Thanks!
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26968
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Clear text config files (from a Cisco world)

Mon Jul 28, 2014 8:46 am

Putty or Terminal should not be having any paste issues. I can paste config just fine.

To export config on screen or in a file, in readable form, use the command "/export"
 
ezrollin
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 52
Joined: Mon Jul 28, 2014 8:04 am

Re: Clear text config files (from a Cisco world)

Mon Jul 28, 2014 8:54 am

Whenever I paste, it autofills what it thinks the command is going to be, it screws it all up.
In cisco you dont have to autofill or hit tab and it will autofill for you.
I could show you
thanks
 
ezrollin
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 52
Joined: Mon Jul 28, 2014 8:04 am

Re: Clear text config files (from a Cisco world)

Mon Jul 28, 2014 8:58 am

I like that /export command!
I can easily copy/paste that export to WordPad or something, modify it. Can I just paste it directly back in?
Mine will have all sorts of complications from pasting to a terminal because of auto-fills.

These are Cisco commands= would I have to "WR" or "copy run start" afterwards to save?
sorry for my inexperience
 
ezrollin
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 52
Joined: Mon Jul 28, 2014 8:04 am

Re: Clear text config files (from a Cisco world)

Mon Jul 28, 2014 9:01 am

I believe the /import command may get me going! thanks
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26968
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Clear text config files (from a Cisco world)

Mon Jul 28, 2014 9:42 am

you can also do "/export file=name" to save the output to file

what you seem to have done, is pressed CTRL+V to trigger auto complete mode. Use right-click to "Paste". Don't use CTRL+V
 
ezrollin
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 52
Joined: Mon Jul 28, 2014 8:04 am

Re: Clear text config files (from a Cisco world)

Mon Jul 28, 2014 9:54 am

http://wiki.mikrotik.com/wiki/Home_Firewall

I figured out that those ^ scripts/configs must be from older versions of O/S or something cause my router CLI was wanting different syntax (mostly different order). It was expecting different commands.

in putty, CTRL+V doesnt do anything at all.. I've been right clicking this whole time (and in terminal)
Thanks
 
ezrollin
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 52
Joined: Mon Jul 28, 2014 8:04 am

Re: Clear text config files (from a Cisco world)

Mon Jul 28, 2014 10:08 am

Is there any way to manipulate the config file from WebFig or some other GUI like that? thanks!
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26968
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Clear text config files (from a Cisco world)

Mon Jul 28, 2014 10:17 am

Whatever you have configured in Webfig or other GUI, will be reflected in the exported "export" file.
in putty, CTRL+V doesnt do anything at all.. I've been right clicking this whole time (and in terminal)
It does, it triggers the auto-complete mode. I just tested it. There will be no messages, it will just be on. Hit it again to type normally without auto complete.
 
ezrollin
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 52
Joined: Mon Jul 28, 2014 8:04 am

Re: Clear text config files (from a Cisco world)

Mon Jul 28, 2014 10:26 am

So thats why its been turning on and off, thanks!

EDIT: THAT has been my problem this whole time! Stupid auto complete!
 
ezrollin
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 52
Joined: Mon Jul 28, 2014 8:04 am

Re: Clear text config files (from a Cisco world)

Mon Jul 28, 2014 10:53 am

/ip firewall filter add chain=input protocol=tcp connection-limit=LIMIT,100 \
action=add-src-to-address-list address-list=blocked-addr address-list-timeout=1d

keep getting a
"value of limit contains invalid trailing characters"

I think its a problem with the connection-limit command. Also, isnt 100 a good # for a home router?
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26968
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Clear text config files (from a Cisco world)

Mon Jul 28, 2014 11:04 am

always put values in "quotes"
 
ezrollin
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 52
Joined: Mon Jul 28, 2014 8:04 am

Re: Clear text config files (from a Cisco world)

Mon Jul 28, 2014 11:28 am

sorry sir, I'm not getting it, can you hold my hand?
which value is the value that requires quotation marks? thanks
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26968
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Clear text config files (from a Cisco world)

Mon Jul 28, 2014 11:29 am

in this case, the one giving the error:

/ip firewall filter add chain=input protocol=tcp connection-limit="LIMIT,100" action=add-src-to-address-list address-list=blocked-addr address-list-timeout=1d
 
ezrollin
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 52
Joined: Mon Jul 28, 2014 8:04 am

Re: Clear text config files (from a Cisco world)

Mon Jul 28, 2014 11:56 am

yep thats one of the ways i tried it. I tried "limit" and "100" and "limit,100" nothing worked.
In the Cisco world it has the marker that shows where the error is but this is over my rookie head.
The reason I thought the error lied in the connection-limit command was that was the place I found I was having the problem by trial and lots of error.
thanks!
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26968
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Clear text config files (from a Cisco world)

Mon Jul 28, 2014 12:59 pm

The command is incorrect in itself, what are you trying to do exactly? The "LIMIT" should be replaced with the actual number of connections that you want to allow per address. "LIMIT" is just a placeholder for the example. Never copy something without checking what it is. Here is an actual example:
/ip firewall filter add chain=input protocol=tcp src-address-list=blocked-addr connection-limit="3,32" action=tarpit 
also don't just copy it, change it according to your needs
 
ezrollin
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 52
Joined: Mon Jul 28, 2014 8:04 am

Re: Clear text config files (from a Cisco world)

Tue Jul 29, 2014 12:08 am

actually, I figured it out:
"connection-limit" was looking for a netmask:

add chain=input protocol=tcp connection-limit=100,255.255.255.0 action=add-src-to-address-list address-list=blocked-addr address-list-timeout=1d

I was following the basic firewall/home setup in the online user manual. I guess it was just giving me syntax from an old RouterOS version.

(So I'm trying to limit TCP SESSIONS to 100 per host)
My question: will that 255.255.255.0 netmask cover all hosts on my network? or does it need a wildcard mask 0.0.0.255 or something? My network is a 192.168.88.X class C so /24 I guess? Thanks again
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26968
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Clear text config files (from a Cisco world)

Tue Jul 29, 2014 8:21 am

actually, I figured it out:
"connection-limit" was looking for a netmask:

add chain=input protocol=tcp connection-limit=100,255.255.255.0 action=add-src-to-address-list address-list=blocked-addr address-list-timeout=1d

I was following the basic firewall/home setup in the online user manual. I guess it was just giving me syntax from an old RouterOS version.

(So I'm trying to limit TCP SESSIONS to 100 per host)
My question: will that 255.255.255.0 netmask cover all hosts on my network? or does it need a wildcard mask 0.0.0.255 or something? My network is a 192.168.88.X class C so /24 I guess? Thanks again
You can replace 255.255.255.0 with 32 like I wrote in my example. It is the same thing. The "/32" netmask means "per IP". No wildcard needed.