I would like to ask if Mikrotik RouterOS is able in some way monitor port 80 (http).
Config is the following:
Router has a public IP. Has a vpn to our central office.
VPN and internet from behind the local router didn’t worked.
We were able to connect to the router trough the public IP and check the config. It was OK.
Then figured out if the ping works from the router and the local subnet to the internet it should be a blocked port problem.
Checked with the local ISP and the had blocked almost all the outgoing ports.
So has the ROS some tool to monitor if a port is open?!
Run telnet to port 80 (it is working, when any program is listening on this port),
when port is open you get reply,
[admin@Test_GW] > system telnet 1.1.1.1 80
Trying 1.1.1.1...
Connected to 1.1.1.1.
Escape character is '^]'.
open
HTTP/1.0 400 Bad Request
Connection: close
Content-Length: 113
Date: Fri, 01 Jul 2011 13:16:02 GMT
Expires: 0
<html>
<head><title>Error 400: Bad Request</title></head>
<body>
<h1>Error 400: Bad Request</h1>
</body>
</html>
Connection closed by foreign host.
Port 80 is closed,
[admin@Test_GW] > system telnet 1.1.1.1 80
Trying 1.1.1.1...
telnet: Unable to connect to remote host: Connection refused
Welcome back!
Any idea how can I use telnet from a script ?
in a script how can I use the telnet command “open”?
how can i determine if the connection was successll or isn’t functional ?
Tera Term Pro is a telnet client with a built-in scripting language. It can also be programmed to change settings in MikroTik Routers if certain conditions are met.