Community discussions

 
morheb
newbie
Topic Author
Posts: 35
Joined: Wed Mar 22, 2017 5:52 pm

telnet on port 80

Sun Aug 20, 2017 12:06 pm

hello everyone
i am using cmd and i want to telnet on port 80

i am supposed to get reply when i connect but i dont get anything
i try to send get request like in the examples i saw but what ever i write i get " bad request error"

what should i do?
 
User avatar
BartoszP
Forum Guru
Forum Guru
Posts: 1715
Joined: Mon Jun 16, 2014 1:13 pm
Location: Poland

Re: telnet on port 80

Sun Aug 20, 2017 12:24 pm

Do you use Mikrotik router?
What is cmd? Isn't it Windows shell?
What examples you are trying?
If you write "whatever" why do you expect proper answer?
Real admins use real keyboards.
 
morheb
newbie
Topic Author
Posts: 35
Joined: Wed Mar 22, 2017 5:52 pm

Re: telnet on port 80

Sun Aug 20, 2017 12:51 pm

Do you use Mikrotik router?
What is cmd? Isn't it Windows shell?
What examples you are trying?
If you write "whatever" why do you expect proper answer?
i use rb951
i saw this video https://www.youtube.com/watch?v=T3h-2YnrdKY
and other examples online using cmd to telnet on port 80

i tried to do the same with my mikrotik but i didnt get any reply
and if i try to send any request i get bad request error and connection closes
 
pe1chl
Forum Guru
Forum Guru
Posts: 5809
Joined: Mon Jun 08, 2015 12:09 pm

Re: telnet on port 80

Sun Aug 20, 2017 1:30 pm

It is normal that you do not get any reply when you connect to a http server.
To understand that, study the http protocol in more detail. There is no initial welcome message like with FTP or SMTP.
When you send a request, it has to conform to the http protocol.
 
morheb
newbie
Topic Author
Posts: 35
Joined: Wed Mar 22, 2017 5:52 pm

Re: telnet on port 80

Tue Aug 22, 2017 8:41 am

It is normal that you do not get any reply when you connect to a http server.
To understand that, study the http protocol in more detail. There is no initial welcome message like with FTP or SMTP.
When you send a request, it has to conform to the http protocol.

thank you for your reply

now i understand

and is it the same with api? i got no reply either


and one more thing, if i connect to the port 80 with telnet, can i control the router and create users for hotspot?

thanks
 
pe1chl
Forum Guru
Forum Guru
Posts: 5809
Joined: Mon Jun 08, 2015 12:09 pm

Re: telnet on port 80

Tue Aug 22, 2017 11:50 am

I would not advise managing the router from port 80 using telnet. Use port 23 for that.
Or better use SSH on port 22.
For API you need special software that talks according to that protocol.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 24190
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: telnet on port 80

Tue Aug 22, 2017 2:11 pm

None of this makes any sense. Please explain what you are trying to do and why. Telnet to port 80 has nothing to do with MikroTik devices.
No answer to your question? How to write posts
 
libyatik
Frequent Visitor
Frequent Visitor
Posts: 53
Joined: Wed Jun 28, 2017 4:31 am

Re: telnet on port 80

Tue Aug 22, 2017 6:08 pm

you cant telnet from your host with port 80
you can use remote server to telnet through a browser embedded telnet client
 
User avatar
k6ccc
Member
Member
Posts: 479
Joined: Fri May 13, 2016 12:01 am
Location: Glendora, CA, USA (near Los Angeles)

Re: telnet on port 80

Wed Aug 23, 2017 12:45 am

I would not advise managing the router from port 80 using telnet. Use port 23 for that.
Or better use SSH on port 22.
Or even better, SSH on a non-standard port with some other restrictions such as what IPs or interfaces can access, port knocking, VPN, etc. In additon to other security features, my routers use a non-standard port for SSH, FTP, HTTP and WinBox, but I have firewall rules that drop packets on the standard ports only so I can see how many attempts there are on those ports. On one of my routers, since the last time I reset the counters a week ago there have been 92 attempts on port 21, 760 attempts on port 22, and 3,304 attempts on port 23. Port 8291 for WinBox only had one however.

Unless there is a really good reason to allow any remote access (and there are some), don't allow any access to the router from the internet.
RB750Gr3, RB750r2, CRS326-24G-2S (in SwitchOS), CSS326-24G-2S, CSS106-5G-1S, RB260GS
Not sure if I beat them in submission, or they beat me into submission


Jim
 
User avatar
acruhl
Member
Member
Posts: 359
Joined: Fri Jul 03, 2015 7:22 pm

Re: telnet on port 80

Wed Aug 23, 2017 7:07 am

you cant telnet from your host with port 80
you can use remote server to telnet through a browser embedded telnet client
Umm. You absolutely can telnet to port 80 to test connectivity. This is basic networking 101:
$ telnet 192.168.88.1 80
Trying 192.168.88.1...
Connected to 192.168.88.1.
Escape character is '^]'.
HEAD
HTTP/1.0 400 Bad Request
Connection: close
Content-Length: 113
Date: Wed, 23 Aug 2017 04:03:26 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.
Once we know what the original user is actually trying to do then someone can give a correct answer.
Stuff.
 
libyatik
Frequent Visitor
Frequent Visitor
Posts: 53
Joined: Wed Jun 28, 2017 4:31 am

Re: telnet on port 80

Thu Aug 24, 2017 12:24 am

you cant telnet from your host with port 80
you can use remote server to telnet through a browser embedded telnet client
Umm. You absolutely can telnet to port 80 to test connectivity. This is basic networking 101:
$ telnet 192.168.88.1 80
Trying 192.168.88.1...
Connected to 192.168.88.1.
Escape character is '^]'.
HEAD
HTTP/1.0 400 Bad Request
Connection: close
Content-Length: 113
Date: Wed, 23 Aug 2017 04:03:26 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.
Once we know what the original user is actually trying to do then someone can give a correct answer.
connecting to http server will require text command post and get methods
protocols are independent from ports
you can use telnet tool to connect to any protocol but you cant use telnet commands
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 24190
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: telnet on port 80

Thu Aug 24, 2017 11:30 am

+1 about this
Once we know what the original user is actually trying to do then someone can give a correct answer.
No answer to your question? How to write posts

Who is online

Users browsing this forum: No registered users and 19 guests