We have qnap nas D4 connected via Mikrotik Rb951ui-2hnd to the internet. I have installed myQNAPcloud Connect app at home to get access to it via VPN, activated open vpn on server. When I try to establish openvpn or pptp connection I am getting endless spinning wheel in myQNAPcloud Connect app. So I assumed I need to do something in mikrotik?
I’m sure that your whole firewall has more rules than just this one. They can influence each other. And so far only you know about everything you have, anyone here can only guess.
The last dstnat rule (with to-ports=0) is wrong, because of to-ports and also because it does not in any way specify original target address, so it will catch also outgoing OpenVPN connections. But the one before it is correct, except that it’s disabled. So enable it and watch what happens. It it doesn’t work, check that its counter increases, it means that packets from outside are reaching your router. If it does increase, use Tools->Torch on bridge1 and look for packets to 192.168.0.8:1194, you should see them. Also pay attention to rx and tx columns. Packets in tx column are going to NAS, packets in rx column are responses from NAS. If there’s tx but zero rx, check the config of NAS.
Thank you! As for the mask, I guess we use just what ISP said? By the way, I have mikrotik hap ac at home from where I am trying to connect to server. Should I do something at home router too?
If “at home” is different network and you only use OpenVPN client from there, you don’t need to do anything special. Of course outgoing connections to your VPN server must be allowed, but that’s default behaviour, so unless you changed it, it’s ok.
True about the mask, but it really is unusual, /18 is huge network with 16 thousand addresses and the mask suggests that they should all be directly reachable on WAN interface without going through another router, at least that’s how things normally work. Which I’m almost sure is not true, but there are ways how it can still work correctly with such mask, so it’s not necessarily wrong. I only mentioned it, so that you can check if it’s really what ISP gave you. Because in case it was mistake, the behaviour would be that almost everything (whole internet) would work correctly, but you would not be able to communicate with most other addresses in this /18 and if VPN client also happened to be in 159.224.192-255.x range, it could explain your problem.
If I’m wrong about the mask, then forget it and try the troubleshooting I described before.
It’s hard to tell why the ISP gave us such settings but our building is really hard to reach and we were just lucky they established connection with another organization in another building next to us. So they connected us over the roofs. Maybe it required some specific settings, I don’t know.
But the funny thing is my ip is 178.150.253.3 so withing the range you specified as potentialy problematic…
Here is what I see in torch when trying to connect with OpenVPN
This is what I see when the 2 bottom lines are showing together (the first line doesn’t matter).
At first I see udp connection with 0 bytes and icmp after that.
One of larger ISPs in my country (which in turn is fairly small) operating FTTH and VDSL used /16 netmask until a year ago. They went to /17 after that. Still some way to reach /18
Their network is running fairly good, seems like they have decent gear in their core network …
Those two rules were supposed to log some packets when you try to connect. So there’s nothing? What about counter for dstnat rule (for port 1194)? Is there anything?
So you have incoming packets, they passed through router and were sent to 192.168.0.8, but as you see, nothing is coming back. In other words, it’s the service on NAS that’s not responding. You need to check what happens there.
I’d still run /tool sniffer quick interface=the-expected-out-interface ip-address=ip.of.the.nas to make sure that the packets do leave towards the proper MAC address via the proper interface before finally concluding that the NAS ignores them.
No, 192.168.0.8 is associated to ether3, so /tool sniffer quick interface=ether3 ip-address=192.168.0.8. When the packet passes through ether1, it still has the public IP as destination, not the private one. And don’t forget to make the command line window as wide as your screen allows before issuing the command.
But before you do that, fix a mistake in your configuratuion. The IP address 192.168.0.1/24 is attached to ether3 but it should be attached to bridge1 instead. The way you have it now it partially works but surprises of all kinds happen.
Which brings me to a question whether the NAS is actually connected to (via) ether3; if not, sniff at the proper one out of ether4, ether5.
But I forgot to say it’s connected via cisco switch. But there are no special settings in it.
THe black cable is connected to the switch. I am not sure if it’s ethernet 1 or 2… I think it’s ethernet 1? So there ethernet 3 is not involved at all but there is settings for it (see below)
The IP address 192.168.0.1/24 is attached to ether3 but it should be attached to bridge1 instead.
The interface and address lists shows:
IS it safe to change that settings? I suspect it has something to do with ISP settings for us