Hi,
I have just configured for the first time mikrotik. Below are my firewall rules and config. I have succesfully configured openvpn server on mikrotik. When I connect to vpn I get an ip from local lan. i can also access other pc with RDP. I would like to also access mikrotik with openvpn but I can’t. How can I make it possible to connect to winbox when I am connected to openvpn from client pc.
Thanks
When I try to connect to winbox from a computer inside LAN(without vpn connection), I can connect with winbox. It’s when I am connect through vpn(I get an ip of the LAN where mikrotik is connected), that I am not able to connect.
So I can connect to router when I am trying to connect from a pc in the office, inside LAN. Can you please help in understanding why I need a rule for vpn, when I don’t need one when I am connecting from a pc inside the LAN without vpn.
Thanks
add action=drop chain=input comment=“defconf: drop all not coming from LAN”
in-interface-list=!LAN
This rule says to block all access that comes from interfaces other than the LAN. Except LAN, all traffic that comes from other interfaces that are not part of the LIST=LAN interface will be blocked.
The VPN interface is created dynamically when connecting and is not part of the LAN LIST. Therefore, you need to create a rule to allow access.
Is the rule you wrote above allowing winbox connection only when connected to vpn? I don’t want to allow connections to mikrotik when not connected to vpn.
Can you explicitely say who should be able to use Winbox?
All LAN users and all VPN users for instance? Or is there a specific IP address besides LAN users?
The suggested rule releases for all interfaces except the WAN interfaces that remained blocked.
Another alternative is to enter the source IP you want to release using the SRC-ADDRESS field, which accepts entering the network e.g.: 192.168.0.0/24 and replace it with the VPN network.
Hi,
Winbox connection must be available to users who are connected to VPN. If possible to the vpn user who will get a specific LAN ip after the vpn connection has been completed.
Thanks
WRONG, users do not get access to the router ONLY THE ADMINs should get access to config the router.
How do to this.
Create a source-address-list=Admin fireall address list!!
Because you dont block it… You decided to allow it with this rule. add action=drop chain=forward comment=
“defconf: drop all from WAN not DSTNATed” connection-nat-state=!dstnat
connection-state=new in-interface-list=WAN
The only thing blocked by this default rule is WAN to LAN traffic that is not dstnatted.
Suggesting its much better to change this to