Community discussions

MikroTik App
 
User avatar
vetusa2
Member Candidate
Member Candidate
Topic Author
Posts: 119
Joined: Sat Jun 18, 2011 8:24 pm

forcin https protocol instead http protocol on some websites

Tue Sep 25, 2012 7:03 pm

i would like to force my network users for their own protection to use to https://www.facebook.com instead of http://www.facebook.com

how???
 
User avatar
vetusa2
Member Candidate
Member Candidate
Topic Author
Posts: 119
Joined: Sat Jun 18, 2011 8:24 pm

Re: forcin https protocol instead http protocol on some webs

Sat Sep 29, 2012 10:38 am

hello!
 
User avatar
c0d3rSh3ll
Long time Member
Long time Member
Posts: 557
Joined: Mon Jul 25, 2011 9:42 pm
Location: [admin@Chile] >

Re: forcin https protocol instead http protocol on some webs

Sat Sep 29, 2012 7:00 pm

try this
/ip firewall nat
add action=dst-nat chain=dstnat comment="https facebook" content=facebook.com \
    dst-port=80 protocol=tcp to-addresses=66.220.158.70 to-ports=443
 
User avatar
vetusa2
Member Candidate
Member Candidate
Topic Author
Posts: 119
Joined: Sat Jun 18, 2011 8:24 pm

Re: forcin https protocol instead http protocol on some webs

Mon Oct 01, 2012 12:40 am

didn't work !
 
Sob
Forum Guru
Forum Guru
Posts: 9121
Joined: Mon Apr 20, 2009 9:11 pm

Re: forcin https protocol instead http protocol on some webs

Mon Oct 01, 2012 1:35 am

As could be expected. That rule silently redirects port 80 to 443 and browser can't know that it happened. So it still talks http, instead of required https. You need to intercept http connection and send proper redirect to https back to browser.
It should be possible using web proxy, I'm just not sure about the one in RouterOS. First, when I add redirect to https://www.facebook.com, it sends this to browser:
Location: http://https://www.facebook.com
Seems like a bug to me (I currently have ROS 5.18, it may be different in newer version). And I also don't see an option to keep the path, so you could redirect http://server/some/path/ to https://server/some/path/ and not only to home page (but maybe I just missed that, I don't use proxy much).
 
Toiletbowl
Member Candidate
Member Candidate
Posts: 169
Joined: Fri Jun 03, 2011 6:49 am
Location: Boracay Philippines

Re: forcin https protocol instead http protocol on some webs

Mon Oct 01, 2012 8:45 am

didn't work !
i use L7 script and work well
 
User avatar
vetusa2
Member Candidate
Member Candidate
Topic Author
Posts: 119
Joined: Sat Jun 18, 2011 8:24 pm

Re: forcin https protocol instead http protocol on some webs

Tue Oct 02, 2012 11:32 am

can you provide me with the layer7 script?
 
User avatar
vetusa2
Member Candidate
Member Candidate
Topic Author
Posts: 119
Joined: Sat Jun 18, 2011 8:24 pm

Re: forcin https protocol instead http protocol on some webs

Wed Oct 03, 2012 9:37 pm

echo!
 
User avatar
c0d3rSh3ll
Long time Member
Long time Member
Posts: 557
Joined: Mon Jul 25, 2011 9:42 pm
Location: [admin@Chile] >

Re: forcin https protocol instead http protocol on some webs

Thu Oct 04, 2012 5:12 am

what is your solution?
 
Toiletbowl
Member Candidate
Member Candidate
Posts: 169
Joined: Fri Jun 03, 2011 6:49 am
Location: Boracay Philippines

Re: forcin https protocol instead http protocol on some webs

Thu Oct 04, 2012 6:32 am

echo!
add action=drop chain=forward comment=force_facebook_drop disabled=no in-interface=your_lan_network layer7-protocol=facebook

/ip firewall layer7-protocol
add comment="" name=facebook regexp=facebook
 
jandafields
Forum Guru
Forum Guru
Posts: 1515
Joined: Mon Sep 19, 2005 6:12 pm

Re: forcin https protocol instead http protocol on some webs

Fri Oct 05, 2012 3:14 am

echo!
add action=drop chain=forward comment=force_facebook_drop disabled=no in-interface=your_lan_network layer7-protocol=facebook

/ip firewall layer7-protocol
add comment="" name=facebook regexp=facebook
That is BAD idea. That will simply block http facebook (and all other sites that have the word facebook anywhere in it!)... it won't redirect. Now, you will get people calling you to say that the "Internet is broken."
 
User avatar
vetusa2
Member Candidate
Member Candidate
Topic Author
Posts: 119
Joined: Sat Jun 18, 2011 8:24 pm

Re: forcin https protocol instead http protocol on some webs

Fri Oct 05, 2012 10:37 pm

is there any working solutions then?
 
Sob
Forum Guru
Forum Guru
Posts: 9121
Joined: Mon Apr 20, 2009 9:11 pm

Re: forcin https protocol instead http protocol on some webs

Sat Oct 06, 2012 12:03 am

It depends.

If you really want it and you're talking about some small IPv4-only office network or something around that size, then wait for hopefully stable MetaRouter in ROS 5.21, create one with OpenWRT and the simplest proxy server with configurable redirects support you can find, transparently redirect http traffic to it, configure the required http redirect rule and you're set.

Other cases will range from more challenging to almost impossible.
 
jandafields
Forum Guru
Forum Guru
Posts: 1515
Joined: Mon Sep 19, 2005 6:12 pm

Re: forcin https protocol instead http protocol on some webs

Sat Oct 06, 2012 3:38 am

i would like to force my network users for their own protection to use to https://www.facebook.com instead of http://www.facebook.com

how???
For their own protection?!?!? That doesn't make sense. What protection will this give them? It won't protect their login information, because all of the logins are already on https.
 
User avatar
vetusa2
Member Candidate
Member Candidate
Topic Author
Posts: 119
Joined: Sat Jun 18, 2011 8:24 pm

Re: forcin https protocol instead http protocol on some webs

Sat Oct 06, 2012 5:08 pm

lol

let me type in your language then

i want them to be working on https://www.facebook.com and not on http://www.facebook.com !
 
jandafields
Forum Guru
Forum Guru
Posts: 1515
Joined: Mon Sep 19, 2005 6:12 pm

Re: forcin https protocol instead http protocol on some webs

Sat Oct 06, 2012 6:34 pm

I understand what you want. I don't understand WHY.

you don't really get any additional protection from it!
 
User avatar
vetusa2
Member Candidate
Member Candidate
Topic Author
Posts: 119
Joined: Sat Jun 18, 2011 8:24 pm

Re: forcin https protocol instead http protocol on some webs

Sat Oct 06, 2012 7:02 pm

are you sure?

not even sniffing :lol:
 
jandafields
Forum Guru
Forum Guru
Posts: 1515
Joined: Mon Sep 19, 2005 6:12 pm

Re: forcin https protocol instead http protocol on some webs

Sat Oct 06, 2012 7:39 pm

seriously? Sniffing Facebook posts? LOL!
 
User avatar
vetusa2
Member Candidate
Member Candidate
Topic Author
Posts: 119
Joined: Sat Jun 18, 2011 8:24 pm

Re: forcin https protocol instead http protocol on some webs

Sat Oct 06, 2012 7:52 pm

how about pictures and comments and even email addresses and most important http passwords?
 
jandafields
Forum Guru
Forum Guru
Posts: 1515
Joined: Mon Sep 19, 2005 6:12 pm

Re: forcin https protocol instead http protocol on some webs

Sat Oct 06, 2012 8:03 pm

login is ALWAYS https in Facebook. So that point is moot.
 
User avatar
vetusa2
Member Candidate
Member Candidate
Topic Author
Posts: 119
Joined: Sat Jun 18, 2011 8:24 pm

Re: forcin https protocol instead http protocol on some webs

Sat Oct 06, 2012 8:43 pm

not from my location!

in my location it is http://www.facebook.com
 
jandafields
Forum Guru
Forum Guru
Posts: 1515
Joined: Mon Sep 19, 2005 6:12 pm

Re: forcin https protocol instead http protocol on some webs

Sat Oct 06, 2012 10:59 pm

not from my location!

in my location it is http://www.facebook.com
Yes it is. Hoover over the sign in button and you will see it.
 
User avatar
vetusa2
Member Candidate
Member Candidate
Topic Author
Posts: 119
Joined: Sat Jun 18, 2011 8:24 pm

Re: forcin https protocol instead http protocol on some webs

Tue Oct 09, 2012 1:51 pm

will this answer your question and make you believe?!

Image
 
jandafields
Forum Guru
Forum Guru
Posts: 1515
Joined: Mon Sep 19, 2005 6:12 pm

Re: forcin https protocol instead http protocol on some webs

Tue Oct 09, 2012 3:15 pm

You are still wrong, because you don't understand the concept. The LOGIN PROCESS is SSL... even when everything else is http.

The NON-SSL message that you see is NOT the login process!!!

Here is what happens:

#1 The login screen is NOT SSL.

#2 You enter your login and password.

#3 You click the LOG IN button. This is linked to an HTTPS SSL PAGE!

#4 After it processes the login, it immediately goes back to NON SSL. That is why you never see the https in the address bar.

Now, if you want to force ALL PAGES to be HTTPS... then you can do that in the facebook settings for each individual facebook user. Then, EVERYTHING is SSL.

LOOK AT THE PICTURE BELOW. Notice that the address bar is HTTP, showig that facebook is in REGULAR HTTP mode. HOWEVER, when you put your mouse over the LOG IN button... at the very bottom it shows the actual link is HTTPS!
You do not have the required permissions to view the files attached to this post.
 
User avatar
vetusa2
Member Candidate
Member Candidate
Topic Author
Posts: 119
Joined: Sat Jun 18, 2011 8:24 pm

Re: forcin https protocol instead http protocol on some webs

Wed Oct 10, 2012 4:54 am

i believe you said

"Now, if you want to force ALL PAGES to be HTTPS... then you can do that in the facebook settings for each individual facebook user. Then, EVERYTHING is SSL."

okay!
so can it be done from mikrotik proxy by redirecting some facebook links or any other way?
 
jandafields
Forum Guru
Forum Guru
Posts: 1515
Joined: Mon Sep 19, 2005 6:12 pm

Re: forcin https protocol instead http protocol on some webs

Wed Oct 10, 2012 8:20 am

i believe you said

"Now, if you want to force ALL PAGES to be HTTPS... then you can do that in the facebook settings for each individual facebook user. Then, EVERYTHING is SSL."

okay!
so can it be done from mikrotik proxy by redirecting some facebook links or any other way?
No, there does not seem to be any good way to do this with Mikrotik. You have to enable SSL inside your facebook account. One problem is that even if you go to https://www.facebook.com and you don't have SSL selected inside your facebook account, facebook will automatically redirect you back to the http version when you do anything.
 
User avatar
vetusa2
Member Candidate
Member Candidate
Topic Author
Posts: 119
Joined: Sat Jun 18, 2011 8:24 pm

Re: forcin https protocol instead http protocol on some webs

Sat Oct 13, 2012 2:41 pm

i wonder why they did it this way :D

thx m8
 
jandafields
Forum Guru
Forum Guru
Posts: 1515
Joined: Mon Sep 19, 2005 6:12 pm

Re: forcin https protocol instead http protocol on some webs

Mon Oct 15, 2012 5:09 am

i wonder why they did it this way :D

thx m8
Facebook always uses SSL on the login screen, and they give you the option to use or not to use https on the other pages.

You are wondering why they give you a choice???? It is because most people don't need SSL on regular pages, but some people want it, so they have that option.

It's easy to turn it on or off in your facebook settings.

I don't see any problem here.
 
regardtv
Frequent Visitor
Frequent Visitor
Posts: 72
Joined: Sat Jan 21, 2006 6:54 pm
Location: Johannesburg, South Africa
Contact:

Re: forcin https protocol instead http protocol on some webs

Mon Oct 15, 2012 9:57 am

i wonder why they did it this way :D

thx m8
Another reason is quite simply system resources overhead - doing all communications via SSL (from the server end) adds a bit of load to their servers. In any environment using SSL where it is needed - and only where it is needed - is ideal - unless you have the cash to burn on extra server hardware ;-)

Who is online

Users browsing this forum: almdandi, Frostbite1991, johnson73, vitaliy91 and 122 guests