Community discussions

MikroTik App
 
David1234
Forum Guru
Forum Guru
Topic Author
Posts: 1424
Joined: Sun Sep 18, 2011 7:00 pm

using web proxy - knowing how is trying to connect

Wed Mar 25, 2015 1:40 pm

Hello ,
I have install web-proxy on my RB411
 /ip proxy print 
                 enabled: yes
             src-address: 192.168.1.0
                    port: 8080
               anonymous: no
            parent-proxy: ::
       parent-proxy-port: 0
     cache-administrator: david
          max-cache-size: unlimited
   max-cache-object-size: 2048KiB
           cache-on-disk: no
  max-client-connections: 600
  max-server-connections: 600
          max-fresh-time: 3d
   serialize-connections: no
       always-from-cache: no
          cache-hit-dscp: 4
              cache-path: web-proxy
and did the firewall redirect
chain=dstnat action=redirect to-ports=8080 protocol=tcp 
      src-address=192.168.1.0/24 in-interface=wlan1 dst-port=80 log=no 
      log-prefix="" 
and added this rule
add action=deny dst-host=*whatismyip.com src-address=192.168.1.0/24
now I can see the counter go up whenever I try to enter the site
but is there any way I will know who is trying to enter?
mac address of the device?

Thanks ,
 
User avatar
hossain2004a
Member Candidate
Member Candidate
Posts: 247
Joined: Mon Dec 22, 2014 7:34 pm
Location: Iran

Re: using web proxy - knowing how is trying to connect

Wed Mar 25, 2015 4:01 pm

but is there any way I will know who is trying to enter?
mac address of the device?

I didn't get it exactly, So can you say more?
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: using web proxy - knowing how is trying to connect

Wed Mar 25, 2015 5:36 pm

There's no logging option in the access rules list, so nothing that simple for you.

Maybe try increasing the log level for web proxy events and seeing if the source IP is available that way.
If so, then you could probably make a more specific logging rule that only matches when the proxy denies access, and stores that in a log file or to a remote syslog server.
 
David1234
Forum Guru
Forum Guru
Topic Author
Posts: 1424
Joined: Sun Sep 18, 2011 7:00 pm

Re: using web proxy - knowing how is trying to connect

Thu Mar 26, 2015 9:47 am

I didn't understand what you are suggestion

all want to see is who is trying to enter the "forbidden" sites
not just to see how many times ,

?

Thanks ,
 
freemannnn
Forum Veteran
Forum Veteran
Posts: 700
Joined: Sun Oct 13, 2013 7:29 pm

using web proxy - knowing how is trying to connect

Thu Mar 26, 2015 6:30 pm

Maybe the title confuse. "How" should be "who"
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: using web proxy - knowing how is trying to connect

Fri Mar 27, 2015 12:17 am

I didn't understand what you are suggestion

all want to see is who is trying to enter the "forbidden" sites
not just to see how many times ,

?

Thanks ,
Sorry - I mean go into system logging, create a new log rule for topic web-proxy. For now, leave the action=memory.
Watch the log viewer and try to access a forbidden site.
Watch what the log entry looks like.
Then adjust your log rule to match only such log entries, or as few as possible.
Make a new action that logs to disk - set the file name to "proxy_denied.log" or whatever makes sense, and choose a maximum lines / file that makes sense.
Change your web proxy logging rule's action to this new specific logfile.
Now you can download this log file to your computer and read it any time you like.
 
User avatar
hossain2004a
Member Candidate
Member Candidate
Posts: 247
Joined: Mon Dec 22, 2014 7:34 pm
Location: Iran

Re: using web proxy - knowing how is trying to connect

Fri Mar 27, 2015 12:43 pm

I don't know whether you test the Syslog and Webproxy while you are running proxy software e.g. free gate or hotspot shield (those software as we know them as Evil software) or not.
As I see, when you use such software, all the logs goes down. Just show you that one of your computer made some connection, but to where, how, what amount and etc is unknown. That's why they call it Evil. So for our network this should be considered.
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: using web proxy - knowing how is trying to connect

Fri Mar 27, 2015 2:27 pm

There will always be an arms race between the controllers and the power users.

Our office uses a monitoring solution to filter web content. They've just had to update their software a lot due to many websites switching to SSL by default. As an employee of a company that wants to filter the web, I dutifully do what I can, but secretly, I laugh about it because I'm against such technology and am happy every time SSL or tunneling defeats things like this.

I've even heard that there is a VPN over DNS technology.
Not udp 53, but actual live DNS queries!
 
User avatar
hossain2004a
Member Candidate
Member Candidate
Posts: 247
Joined: Mon Dec 22, 2014 7:34 pm
Location: Iran

Re: using web proxy - knowing how is trying to connect

Fri Mar 27, 2015 7:48 pm

VPN over DNS?
what is it?

The only usage of VPN which is used by majority of people in my country is for proxy purposes and passing filter contented websites. And of course some company used it for their network. but VPN over DNS??
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: using web proxy - knowing how is trying to connect

Fri Mar 27, 2015 9:44 pm

I'm not sure how it worked, but supposedly it could encapsulate packets into RR data and the client could request these to get packets and the other side would do the same. I guess they had specific host names to request.
Of course the "authoritative" server for these RR wasn't a real DNS server but the VPN endpoint. Some subdomain points NS delegation authority to this server for some clever subdomain.

You could definitely uuencode a file and store it as a sequence of TXT records on DNS if you wanted, right now.
If you pgp encrpyted the file first, and then uuencoded the file and stored the results in TXT records.....

Then you could litterally serve files securely from a DNS server.

Suppose some powerful domain like google.com created a service to host these - they would let you get some arbitrary sub-domain myfileisgood.google.com and they could simply point an NS authority delegation to whatever server you choose and the blocks would be on your server as:
block-nnnnnnn.myfileisgood.google.com TXT "first block of the file"
block-nnnnnn1.myfileisgood.google.com TXT "second block"
Once the client's DNS server knows that *.myfileisgood.com is answered by your server, it never bothers google again so it wouldn't even add load to their public DNS servers.....

Would you be so bold as to block subdomains of google.com in your live DNS?

Or the data could be encoded into valid character sets for hostnames and stored as CNAME or MX records so you wouldn't be able to block TXT type queries....


Am I now evil? :)
 
User avatar
hossain2004a
Member Candidate
Member Candidate
Posts: 247
Joined: Mon Dec 22, 2014 7:34 pm
Location: Iran

Re: using web proxy - knowing how is trying to connect

Sun Mar 29, 2015 7:43 am

:D
.
.
.
.
One of my law in computer's stuff learning Is to know the lowest level of one thing, one knowledge or one matter. So you would know how system works.
And for these DNS stuff you said, Thank you ZeroByte :D fascinating
 
David1234
Forum Guru
Forum Guru
Topic Author
Posts: 1424
Joined: Sun Sep 18, 2011 7:00 pm

Re: using web proxy - knowing how is trying to connect

Sun Mar 29, 2015 4:19 pm

I have try to do what you said
open a loggin with web-proxy

but there isn't any MAC address there - only the IP I gave to the device
so if we will try the next day - I can't know that this device try 2 times now ...(probably because he got another IP)

Thanks ,
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: using web proxy - knowing how is trying to connect

Mon Mar 30, 2015 11:19 pm

If you can extract the IP addresses from the logs, then you will also need to log DHCP assignments in order to have complete information. This is because web proxy is an ip-based service. You could have a single proxy at the core of a large network, and it would not have access to the individual end users' mac addresses all over the network.....
 
David1234
Forum Guru
Forum Guru
Topic Author
Posts: 1424
Joined: Sun Sep 18, 2011 7:00 pm

Re: using web proxy - knowing how is trying to connect

Tue Mar 31, 2015 3:27 pm

O.k. I understand
Thanks ,

Who is online

Users browsing this forum: No registered users and 38 guests