Page 1 of 1

Monitoring port 80

Posted: Fri Jul 01, 2011 3:44 pm
by punn
Hi!

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?!

Thank you for the reply!

Best regards
Gabor
Prague

Re: Monitoring port 80

Posted: Fri Jul 01, 2011 4:19 pm
by sergejs
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!

Re: Monitoring port 80

Posted: Fri Jul 01, 2011 4:44 pm
by punn
can I run the telnet command in a script ?
so if the main connection doesn't work so I can switch it to a backup internet?

Re: Monitoring port 80

Posted: Mon Jul 04, 2011 4:51 pm
by punn
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 ?

Thanks for the help!

Re: Monitoring port 80

Posted: Tue Jul 05, 2011 11:32 am
by bburley
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.