I want to host few files for some people that why I want to give them access but I don't want to give them access to my vpn because I run other things on that as well.No, do it properly via VPN.
SMB SHOULD NOT be exposed to the internet.
/ip cloud set ddns-enabled=yes
/interface list
add name=WAN
/interface list member
add interface=ISP-eth1 list=WAN
add interface=ISP2-eth2 list=WAN
/ip firewall address-list
add address=TRUSTED_REMOTE_NETWORK list=Trusted
/ip firewall nat
add action=dst-nat chain=dstnat dst-port=445 in-interface-list=WAN protocol=tcp src-address-list=\
Trusted to-addresses=192.168.11.100 to-ports=445
and ofcourse you need forward port on isp/interface list member
Thanks manmaybe something like this
Code: Select all/ip cloud set ddns-enabled=yes /interface list add name=WAN /interface list member add interface=ISP-eth1 list=WAN add interface=ISP2-eth2 list=WAN /ip firewall address-list add address=TRUSTED_REMOTE_NETWORK list=Trusted /ip firewall nat add action=dst-nat chain=dstnat dst-port=445 in-interface-list=WAN protocol=tcp src-address-list=\ Trusted to-addresses=192.168.11.100 to-ports=445
so if you have multiple ISP just add id to this
and ofcourse you need forward port on isp/interface list member
445 to your Mikrotik IP (if mikrotik gets 192.168.0.11 from ISP that IP is to where you need to forward)
(if its fiber, you dont need to, this is enough)
It's gonna give very limited access based of username and password and only for one folder.Another host for the botnet...
It's not about the actual content, it's because the users have a very limited and slow internet connection inside that country to the outside so when they connect with vpn or other file sharing services on internet that's going to be very useless, so that's why it's a workaround over there because files are in large size but if I give them access without vpn and direct to the server which is in the same city as they are it's going to be super-fast and easy for them to connect because if both sides are using ips of that country isps are going to route the connection in something like intranet which is very fast.There are thousands of free file sharing services on the internet...
You have to share something truly illegal to not want to use them.
If you share them "zipped" with a 100-digit password, no one will decrypt them who does not know the password ...
i have told you that add in address list Trusted IPs that are public/private in your remote locations.Thanks manmaybe something like this
Code: Select all/ip cloud set ddns-enabled=yes /interface list add name=WAN /interface list member add interface=ISP-eth1 list=WAN add interface=ISP2-eth2 list=WAN /ip firewall address-list add address=TRUSTED_REMOTE_NETWORK list=Trusted /ip firewall nat add action=dst-nat chain=dstnat dst-port=445 in-interface-list=WAN protocol=tcp src-address-list=\ Trusted to-addresses=192.168.11.100 to-ports=445
so if you have multiple ISP just add id to this
and ofcourse you need forward port on isp
445 to your Mikrotik IP (if mikrotik gets 192.168.0.11 from ISP that IP is to where you need to forward)
(if its fiber, you dont need to, this is enough)
are these settings are gonna bypass the vpn?
What is src-address-list=Trusted? I don't know from what addresses users are gonna access this.
Yeah ISP gave me 192.168.0.104 on their modem
/ip firewall address-list
add address=20.10.9.8 list=Trusted
this is public access, there is no need for VPN.are these settings are gonna bypass the vpn?
I don't know from which IPs they are going to connect to the smb server. I want it to be open so anyone can connect and then it will ask for username and password to access the files.i have told you that add in address list Trusted IPs that are public/private in your remote locations.
So if my house with public ip 20.10.9.8 want to access that smb, you will add in that address list that ip
When router is connected to the vpn (IKEV2 ipsec) is this possible to also act as a vpn server just in order to give them access to the smb server but nothing else not even internet or anything just smb?Most secure solution is to use some VPN which is very easy to make on mikrotik and use it on Windows/Linux
if both sides are using ips of that country isps are going to route the connection in something like intranet which is very fast.
I don't know from which IPs they are going to connect to the smb server.
The idea is to give that ddns address to a group of people (100~) in telegram (private group) with a username and password to connect to the smb server and I know they are all located in the same city as the smb server is.if both sides are using ips of that country isps are going to route the connection in something like intranet which is very fast.
I don't know from which IPs they are going to connect to the smb server.
Uhm......
It's not a private IPIt says that you are behind NAT, if your ISP provide to you a private IP, there is nothing to do. Only way is use ZeroTier or Tailscale.
Regards.
/ip firewall nat
add chain=dstnat in-interface=<WAN> protocol=tcp dst-port=6666 action=log
Cloud always shows the public IP address. The information should be checked on IP -> addresses and see your WAN port.It's not a private IPIt says that you are behind NAT, if your ISP provide to you a private IP, there is nothing to do. Only way is use ZeroTier or Tailscale.
Regards.
Screenshot 2021-11-21 000958.jpg
Thank you very much.It doesn't mean anything, that's what server sees and it's always public address, no matter behind how many other routers you are. What matters is whether you can forward ports from that address to your router.
Best case is that the address is "yours" and ISP is doing NAT 1:1, i.e. forwards all ports to your router. You can test it, if you add logging rule, e.g.:
Then find some online port tester and let it check selected port number on reported public address. If you see a packet logged every time you test it, then it's good news for you.Code: Select all/ip firewall nat add chain=dstnat in-interface=<WAN> protocol=tcp dst-port=6666 action=log
Other possibility is that you have access to upstream router which has this public address and you can configure port forwarding there. Your ISP would most likely tell you about it.
If it's neither, then too bad, you're out of luck.
Yeah thanks to you guys.At least you got incoming connections out of it, that's nice to have thing.
Yeah maybe, but for now I disabled the ip cloud cause not going to use it until setup the VPN on router.You can experiment further, if you want. For example, make proper VPN for users, so they could connect to your router, and then access 192.168.11.100 directly. It would be nice and secure. Only depending on needed speeds and router's performace, there could be a bottleneck.
Thanks for the deep explanation.With so many bots out there, its a matter of when not if.................... I hope I am not exaggerating the risk.
Any suggestion to make it more secure?So how secure it is depends on how you configure your router's firewall. Yours is not too bad, input rules can be reordered a bit, but it's not insecure.
Yeah, I used to have L2TP/IPSec then I change it to IKEV2/IPSec and forgot to remove those rules.Not really more secure, just small tweaks, for example in chain=input:
- you allow ports 500, 4500 and 1701, which would be for incoming L2TP/IPSec, but you don't seem to have that, so it's probably not needed
- if you need any such rule to allow something, it should be after the two rules that accept established & etc and block invalid
Is there any guide how to setup it on mikrotik?If you want maximum security and forget DMZ, firewall rules, port forwarding and NAT problems, simply use ZeroTier or Tailscale (Best is use both, one of fail over). Is my best recommendation.
Regards.