Uhm you explained everything very clearly.If you wanted to just look at the current traffic, and the IP of the web server the clients are visiting, you can just use "/tool torch".
If you want to see the contents and store (some of?) it, it's a little more complicated. I'd go for setting up a web server as a "transparent proxy":
Set up a web server with a server language such as PHP. Then make it make a request to whatever the HTTP request dictates with $_SERVER['HTTP_HOST'], $_SERVER['REQUEST_URI'] and so on, and output whatever the remote site outputs, with headers and everything. You can then store the request and/or response on the web server. At the router, in the "/ip firewall nat" menu, create a rule that does "dst-nat" to the web server whenever the client's dst-port is 80 (i.e. HTTP's default port). If you want to match HTTP content on an arbitrary port, you'd have to set up a layer7 match, but that will make the connection even more drastically slow than the transparent proxy already does.
This approach also allows you to potentially alter the site on-the-fly BTW (but if you do that, do it with care, because it's very performance costly).
P.S. In case it's not obvious, you can't capture HTTPS like that... maybe capture the encrypted traffic, but there's little use for that.
If you're going to use a protocol analyzer, it MUST be in the same LAN as the RouterOS router, yes.you suggest to put webserver into the same LAN of CPEs?
With a protocol analyzer, you can't alter in/out data, even if you wanted to.For avoid altering in/out data?
Tell me if if my understanding is correct, I need one webserver for each CPE/client?
If you place it in the same LAN as your public facing interface, you'll capture traffic that has already been processed by the router, and you wouldn't be able to tell MAC addresses of CPEs (and if your network is NAT-ted, you wouldn't be able to tell apart IPs either).
If you instead place it in the same LAN as your private facing interface (where the CPEs are), you'd be able to capture all traffic - allowed or merely attempted - as well as the router's response to it, which means a more complete data set. You'd also be able to store MACs too (and if the network is NAT-ted, keep private IPs too).
It doesn't "need" to be on the same switch, but depending on topology, and whether any of your switches are "smart", not connecting them on the same switch might result in some connections being missed.
Basically, use a switch which is NOT a "smart" one. If you want to be 100% sure, use a "Hub" instead of "Switch", since a "Hub" is by design always "mirror"-ing traffic.What do you mean for "mirror"?
Yes. Port mirroring works on OSI layer 2 - the same level as switches work in general - while IP and NAT happen on layer 3 (i.e. in routers in general). As long as the smart switch is within your private network, it will appear to work transparently in it, the same way as a regular switch. Users wouldn't even know or be able to detect they're being monitored (you sneaky bastard !).mirroring will work also into a NAT network?
mirroring is separate from ip configuration?
Who's talking about any sort of load balancing?I don't want load balancing between two isp's
Well, in that case, you can use the second topology above... though that does indeed mean replacing almost all switches with smart switches (so yeah, not exactly cheap, though cheaper and easier to pull off than the kind of rework the first topology would require). All of your CPE connected switches (in the above picture, labeled SwOS_1 and SwOS_2) should end up reaching, through their mirror port, a single smart switch from which all ports lead only to the web server.I'm sorry. I meant I don't want to change actual network topology.
By now each Ap is connected directly to separate ISP modem
Wait, wait... How many non-CPE routers do you have that are under your control? And how many ISP modems are there connected to how many of them? How many of them do NAT?In second topology why did you place a routeros after each ISP modem?
So for dual wan setups I need 3 smart switch right?
I assumed you mean CPE connecting to AP, connecting to a switch to RouterOS to the ISP modem (similarly to your very first picture in this topic), with each AP going over a separate entire chain... i.e. I assumed you have X number of APs, X switches, X RouterOS, and X ISP modems... but apparently, that's not the case, so what is it?By now each Ap is connected directly to separate ISP modem
First of all caching server, that is correct. But a lot of features besides, like configurable details of traffic logging, and various options to allow redirection. I.E. in case, user wants to visit a blocked site (blocked using a blocklist, filtering module for parental control etc.), to redirect to special URL displaying error msg. Or redirecting to splash page in case of a hotspot.You're talking about users redirection?
I always thought to use squid as caching server...so it could solve traffic logging & saving I guess
@boen_robotWhat?!? For each modem?!? No! The very opposite!
See the below topology: And if you have multiple RouterOS routers (each connected to a separate modem), you can connect all smart switches to a single smart switch, from which instead of using port mirroring, you simply make a rule by which traffic from all other ports will unconditionally go to the web server's port.
e.g.:
GNS3 - It's a great network simulator I recently learned about through this forum.@boen_robot
which software did you use to create that map? thanks
So... the only MikroTik devices in your topology are the APs then, is that it?yes, @boenrobot
my network topology is as your second topology picture, I guess in first topology load-balancing is a must
anyway:
isp1=modem1->ap1->cpe's->client network
isp2=modem2->ap2->cpe's->client network
so only one difference with your pic, there's no mikrotik router between isp modem and ap.
with natted network I mean each node ap and cpe do NAT so they are in different lan's
It can run MikroTik via Quemu or VirtualBox. For Cisco IOS, it supports specialized emulators that are more resource efficient. i.e. simulating a topology with hundreds of Cisco routers will consume less CPU and memory than the same number of RouterOS routers. It's important to note that with just ~3 routers or so, there isn't much of a difference, so for small scale "check it out, so that you get a feel for it" kind of scenarios, it all works just as well.it requires cisco ios?
Sorry,but can you explain how can i capture https??Thanks in advanceIf you wanted to just look at the current traffic, and the IP of the web server the clients are visiting, you can just use "/tool torch".
If you want to see the contents and store (some of?) it, it's a little more complicated. I'd go for setting up a web server as a "transparent proxy":
Set up a web server with a server language such as PHP. Then make it make a request to whatever the HTTP request dictates with $_SERVER['HTTP_HOST'], $_SERVER['REQUEST_URI'] and so on, and output whatever the remote site outputs, with headers and everything. You can then store the request and/or response on the web server. At the router, in the "/ip firewall nat" menu, create a rule that does "dst-nat" to the web server whenever the client's dst-port is 80 (i.e. HTTP's default port). If you want to match HTTP content on an arbitrary port, you'd have to set up a layer7 match, but that will make the connection even more drastically slow than the transparent proxy already does.
This approach also allows you to potentially alter the site on-the-fly BTW (but if you do that, do it with care, because it's very performance costly).
P.S. In case it's not obvious, you can't capture HTTPS like that... maybe capture the encrypted traffic, but there's little use for that.
.Sorry,but can you explain how can i capture https??Thanks in advance
if i have the website certificate,is possible to decrypt https?.Sorry,but can you explain how can i capture https??Thanks in advance
While you can capture any kind of traffic, including encrypted one (https or VPN or ...), it is extremely hard do decrypt it to see the contents of communication. And that's by design, encryption is there exactly for this reason.