Comments (11)
I
so you are dropping all invalid traffic that includes 8728 put the following right at top of the table to accept traffic from 8728
do the below rule to allow it and move it to top
/ip firewall filter add dst-port=8728 protocol=tcp action=accept comment="Allow API Through" chain=input
see if that helps you
from routeros-client.
why are you using HTTPS it won't work as its not a rest API
in your host, you must add in the IP of the router and if you using a custom API port
you must add in the port example below
This works over a VPN as well
const api = new RouterOSClient({ host: "192.168.1.66" user: "admin" password: "admin" port: 8728 })
from routeros-client.
@woudanator
I created a VPN in this site https://www.hostddns.us/.
Then setup a ovpn client following this guide https://docs.hostddns.us/docs/vpn-remote/tutorial-mikrotik-ovpn-client/
I can now access the router remotely,
however when I tried using my vpn url its not working ( base on what you've said ).
Recently I also tried using the IP address of my vpn.
The same thing happened, unable to connect.
RosException: Timed out after 10 seconds
at Connector.onTimeout (E:\Projects\mikrotek-test\node_modules\node-routeros\dist\connector\Connector.js:188:30)
at Object.onceWrapper (events.js:299:28)
at Socket.emit (events.js:210:5)
at Socket._onTimeout (net.js:469:8)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7) {
name: 'RosException',
errno: 'SOCKTMOUT',
message: 'Timed out after 10 seconds'
}
from routeros-client.
@woudanator
Here's what I'm trying to do.
Normally you can connect using routeros-client if you are connected locally in the mikrotik router ( LAN ).
What I'm trying to setup is to establish a connection remotely ( WAN )
from routeros-client.
have you established that the port is not blocked on the WAN as it might not allow you in via the VPN address due to firewall rules?
make sure you allow traffic to TCP port 8728
maybe try to use NMAP to see if the router allows you in
if you have a dynamic IP you would need to implement a resolver in nodejs to resolve the DNS name to an IP before connecting as far as i am aware routeros-client does not have this built-in but I might be wrong
`
from routeros-client.
Had a quick look at the DNS service you using and you need to forward traffic from port 8728 on your panel for your DNS so it allows traffic to the router at the moment if you followed the guide you only forwarded port 80 that gives you access to the web interface but not the api
from routeros-client.
I tested 2 VPN for port 80 and 8921.
Now I changed 8921 to 8728.
The same thing happened cant connect
from routeros-client.
Using local IP
Using the VPN IP
from routeros-client.
Hi
It shows the connection is being refused by the router what firewall rules do you have on your router
from routeros-client.
Which router do you mean ?
the ISP router or the Mikrotik router ?
Here are the firewall rules in my mikrotik
from routeros-client.
@woudanator
Thank you, you're amazing!
I can connect now.
Again many thanks.
from routeros-client.
Related Issues (17)
- improve remove, update and etc to query for the id of the entry HOT 2
- Switching between servers. HOT 17
- speed-test stream HOT 3
- getting an exception while deleting a record
- Connect to multiple devices at the same time
- Where Filter Not Working With Update, Delete, Remove.
- I cant add user to radius server via /tool/user-manage/add anyone can help me HOT 1
- problem on torch pppoe interface
- Error: Username or password is invalid HOT 2
- Error with TypeScript 2.9.2 HOT 4
- Stream does not work HOT 2
- events.js:167 throw er; // Unhandled 'error' event HOT 3
- TypeError: RouterOSClient is not a constructor HOT 2
- Request: an add time function for some timer parameters HOT 1
- RosException HOT 5
- cant get /interface/wireless/monitor Information HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from routeros-client.