Hello,
I have a Openvpn server on my Mikrotik router
I’m able to connect to it - and everything is working
when I connect to the server it’s from unknown\dynamic IP (using android device on cellular network)
today I saw there are many Ip that are trying to connect (which are not my trying)
for example:
162.142.125.129
167.94.138.117
167.248.133.63
how can I block them ?
I can’t do “Port-Knocking” because I’m using the standart openVPN app
is there something I can do ?
Two approaches I can think of: whitelisting or blacklisting.
I used to have a blacklist and added IP blocks by hand, based on logging. I stopped with that as the list got very long. But it might suit you. I know there are also geo lists available.
This is what I thought to do also - but as you said it’s whould be maintain manually
is there any way to know maybe if the user put wrong pass 3 times from the same IP - then I will block it for 1 hour (example of thinking)
So ? Just install a “port-knock” app on your Android device.
This has nothing to do with the VPN-app.
The only thing : you first need to execute the portknock-app, then launch the OpenVPN app.
I use an Android app call “Port Knocker” where you can setup the sequence that needs to be knocked.
You can block IP trying to get inn if there are x number of failed attempts. (Solution found in this forum) I do use it.
You can block all IP trying to use a port that is not open on your router, for example for 24 hours. This stops port scanners as soon as it hits first blocked port. I do use this solution as well. (Solution found in this forum)
I didn’t know there is an Andriod App for this … thanks!
but now that I’m thinking about it , I have another problem
my Mikrotik is behind another router that he is the main gateway
in the “Main router” I have only port forward the VPN port TCP_1194 - so will the port knocking is not afective , unless I open another port and forward it to the Mikrotik - no?
this is what I see in the log , it’s seem that some success connect to my netwrok, no ?
15:20:28 ovpn,info TCP connection established from 167.94.138.47
15:20:28 ovpn,debug,packet sent P_CONTROL_HARD_RESET_SERVER_V2 kid=0 sid=7843a8f18b30eeb3 pid=0 DATA len=0
15:20:28 ovpn,debug,packet rcvd P_CONTROL_HARD_RESET_CLIENT_V2 kid=0 sid=3d56fddc9a0938f pid=0 DATA len=0
15:20:28 ovpn,debug,packet sent P_ACK kid=0 sid=7843a8f18b30eeb3 [0 sid=3d56fddc9a0938f] DATA len=0
15:20:28 ovpn,debug <167.94.138.47>: disconnected <peer disconnected>
15:20:28 ovpn,info TCP connection established from 167.94.138.47
15:20:28 ovpn,debug,packet sent P_CONTROL_HARD_RESET_SERVER_V2 kid=0 sid=15f09831dff6ddb4 pid=0 DATA len=0