Community discussions

MikroTik App
 
Geoholz
just joined
Topic Author
Posts: 4
Joined: Wed Mar 01, 2017 9:22 am

Access Winbox with starting configuration

Wed Mar 01, 2017 9:54 am

Hello,

I have a hAP with default configuration (switch eth2-3-4-5-wifi, dhcp server, dhcp client on eth1)

I would like to reach Winbox since eth1 ( internet )

Default configuration of firewall :

/ip firewall filter
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment="defconf: accept established,related" connection-state=established,related
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" connection-state=established,related
add action=accept chain=forward comment="defconf: accept established,related" connection-state=established,related
add action=drop chain=forward comment="defconf: drop invalid" connection-state=invalid
add action=drop chain=forward comment="defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat connection-state=new in-interface=ether1
add action=drop chain=input comment="defconf: drop all from WAN" in-interface=ether1
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" out-interface=ether1

With default configuration, it is not possible to access the router with Winbox from internet (eth1)

So i add this rules :
add action=accept chain=input comment="Winbox from Internet" dst-port=8921 protocol=tcp

But it doesn't works..

Can you help me ?
 
User avatar
shailparmar
Frequent Visitor
Frequent Visitor
Posts: 97
Joined: Wed Aug 20, 2014 6:07 pm
Location: GB
Contact:

Re: Access Winbox with starting configuration

Wed Mar 01, 2017 10:23 am

Remove this rule
interface=ether1
add action=drop chain=input comment="defconf: drop all from WAN" in-interface=ether1
 
Geoholz
just joined
Topic Author
Posts: 4
Joined: Wed Mar 01, 2017 9:22 am

Re: Access Winbox with starting configuration

Wed Mar 01, 2017 10:44 am

Yes i know this will work if i remove this rule

But it is more secure no ?

Is it possible to drop all exept 8921 ?

And if i put my rule before the drop all, why doesn't works ??
 
janus20
Member Candidate
Member Candidate
Posts: 108
Joined: Thu Nov 03, 2016 10:31 am
Location: Pitesti, Romania

Re: Access Winbox with starting configuration

Wed Mar 01, 2017 12:29 pm

Hi,

Just a guess:

a. put your input before any drop rule
/ip firewall filter
add action=accept chain=input comment="Winbox from Internet" dst-port=8921 protocol=tcp in-interface=ether1
b. disable rule
add action=drop chain=forward comment="defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat connection-state=new in-interface=ether1
Does it work now ?

kind regards,
 
Geoholz
just joined
Topic Author
Posts: 4
Joined: Wed Mar 01, 2017 9:22 am

Re: Access Winbox with starting configuration

Wed Mar 01, 2017 12:39 pm

No,
It works only when i disable : add action=drop chain=input comment="defconf: drop all from WAN" in-interface=ether1
 
nescafe2002
Forum Veteran
Forum Veteran
Posts: 915
Joined: Tue Aug 11, 2015 12:46 pm
Location: Netherlands

Re: Access Winbox with starting configuration

Wed Mar 01, 2017 12:43 pm

Port number is 8291..
 
janus20
Member Candidate
Member Candidate
Posts: 108
Joined: Thu Nov 03, 2016 10:31 am
Location: Pitesti, Romania

Re: Access Winbox with starting configuration

Wed Mar 01, 2017 12:45 pm

Hi,
Port number is 8291..
Sharp eyes... i did not notice it :)
/ip firewall filter
add action=accept chain=input comment="Winbox from Internet" dst-port=8291 protocol=tcp in-interface=ether1
kind regards,
 
Geoholz
just joined
Topic Author
Posts: 4
Joined: Wed Mar 01, 2017 9:22 am

Re: Access Winbox with starting configuration

Wed Mar 01, 2017 12:47 pm

OMFG !
2 days !!

RTFM slowly.. :(

Sorry and thanks
 
janus20
Member Candidate
Member Candidate
Posts: 108
Joined: Thu Nov 03, 2016 10:31 am
Location: Pitesti, Romania

Re: Access Winbox with starting configuration

Wed Mar 01, 2017 12:51 pm

Hi,

No problem. Anytime :)

kind regards,