How to monitor the traffic that goes thru my internet

I have a cable internet connection that goes to a ASA firewall and then into my local network where i have several machines including many VM’s on a esxi server. I am looking for a way to monitor mainly my internet traffic to see the most visited websites and the host that visited these sites. I am not able to put any agents or modify the settings on the devices connecting but I do control the wifi and and ASA. Thanks for any suggestions.

DoS attack Apache HTTP and all CPU goes 100%

We are getting a Dos attack on our web server. We enabled Cloudflare and add these rules:

If it is not SSL connection Block all. That fixed pretty much all attacks.

I would like to ask pros about this.

When I used that command :

netstat -npt | grep 80 | awk '{print $  5}' | grep -Eo '([0-9]{1,3}\.){3}[0-9]{1,3}' | cut -d: -f1 | sort | uniq -c | sort -nr | head 


 108 5.1xx.1x4.2x5  This is my server IP  59 1x8.1x4.1x1.1x1  50 162.1x8.38.196  40 1x2.x5x.93.1x9  38 1x2.1x8.226.94  37 x62.15x.88.248 

After seeing my server IP I really confused.

I block all connections to 80 port except cloudflare’s.

Right now, Some of my products I use, cannot query licenses from other servers due to blocking 80 ports.

I read some blogs it says SYN attack and my server sending response but not getting any response back so It use a lot of CPU.

How can I solve this problem with Iptables. I think attack is not big one so Iptables can handle If i use right rule.

thank you.

UK visa goes to VAC first or home directly?

I applied for UK visa from Munich and opted for the courier service to deliver the passport to my home. I got the mail on friday(7th june) that my UK visa application has been dispatched with no tracking number mentioned. I want to understand that whether the visa will be sent to the visa office in Munich first and then courier it to me or it will be directly couriered to me? I have to travel on Tuesday evening (11 june) but not sure how can I get the visa on time. If it goes to Munich office first, then should I go to munich Office on Tuesday morning and collect it from there or should I wait for courier at home? Did anyone faced this kind of issue? Due to holiday on Monday, I am not sure how I can get visa on time.

Possible bug in and handling of getOrigData when updating tier prices, goes away when cleaning the cache

We are on Magento 2.2.8 and I was debugging the following issue for hours:

When sending a product-update via the REST API, we were getting

Unique constraint violation found 

for a request as simple as


Request body:

{"product": {"sku": "B1234","customAttributes": [{"attributeCode": "meta_keyword","value": "Bälle"}]}}} 

The big problem is, that I cannot reproduce it using the Production Database Dump locally.

It seems to be strongly related to products which have a tier price in the database (which I am not updating in the REST call).

Luckily I was able to reproduce it somehow on a staging instance on the same machine as production and trace there error down to

vendor/magento/module- catalog/Model/Product/Attribute/Backend/TierPrice/UpdateHandler.php 

There is the following code

        // prepare original data to compare         $  origPrices = $  entity->getOrigData($  attribute->getName());         $  old = $  this->prepareOldTierPriceToCompare($  origPrices);         // prepare data for save         $  new = $  this->prepareNewDataForSave($  priceRows, $  isGlobal);          $  delete = array_diff_key($  old, $  new);         $  insert = array_diff_key($  new, $  old);         $  update = array_intersect_key($  new, $  old); 

Using var_dump-driven development techniques I was able to see, that $ old is empty even there IS a database row for the tier price.

Actually the whole getOrigData() is empty.

That causes having $ insert a value which IS already in the database

So MySQL (MariadB) throws an error at the following insertValues call, which tries to insert the already existing value.

        $  isAttributeChanged = $  this->deleteValues($  productId, $  delete);         $  isAttributeChanged |= $  this->insertValues($  productId, $  insert);         $  isAttributeChanged |= $  this->updateValues($  update, $  old); 

This is the error:

 "SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '19211-1-0-10.0000-0' for key 'UNQ_E8AB433B9ACB00343ABB312AD2FAB087', query was: INSERT INTO `catalog_product_entity_tier_price` (`entity_id`, `all_groups`, `customer_group_id`, `qty`, `value`, `percentage_value`, `website_id`) VALUES (?, ?, ?, ?, ?, ?, ?)" 

Now the interesting part: If I clean the Magento cache, the problem disappears. For a while. But after another while seems to / might happen again.

Did anybody see such behavior before? Should we just refactor the core to not be so dependent on getOrigData?

EDIT The bug can be reproduced after some time again. Clearing the cache then fixes it. For now I stored the redis cache in a backup and will try to reproduce the issue locally by loading that cache.

Macbook Air goes to sleep when Magsafe connects

My 2015 Macbook Air goes to sleep the moment the MagSafe adaptor connects and the screen won’t turn on until I disconnect the adaptor.
My battery icon shows that it detects the adaptor but doesn’t charge.

My laptop is currently out of battery, and says so when I press the power button. The moment I connect the adaptor, it shows the charging symbol, but then the screen goes black again. I’ve left it connected for two days and although it detects the adaptor, it doesn’t actually charge the computer.

I’m not sure whether I should buy a new Magsafe adaptor or if this is a problem with the computer itself. I haven’t yet tested the computer with another adaptor but plan to do so, I was just wondering if anyone had any idea what the issue might be.

Before my battery died, I tried resetting both my PRAM and SMC and nothing changed.

Thanks in advance.

MacBook Pro mid 2015 sound suddenly goes

Today when i am using my mbp 2015 retina , sound went off suddenly. Internal speaker or headphones same. I can onlu get sound from hdmi output. Sound settings are ok. Diagnoatic doesnt shows any problem. I have reset the nvram and smc. Doesn’t work out. When i plug in headphones or plugout i can hear playing sound just for a second but fade out very quickly. Also no red lights in headphone jack. Is there anything i can do? I am running OS X movaje

One of three displays goes blank after locking screen and returning in Ubuntu 16.04 LTS

I have three displays in my computer setup with two plugged with HDMI-cables and one with DisplayPort-cable. My problem is the following:

When I start my computer all the displays start and work correctly. If I lock my screen for a little while (say few minutes) and then open the lock all screen work fine. If however I lock my screens and go away for a longer time (say 15-30 mins) and then open screen lock, one display plugged with HDMI-cable does not start. Even if I try to adjust display settings nothing happens. My current fix is to restart the computer and then all the displays fire up correctly.

What could be the cause of this problem and how to fix this? I suspect it might have something to do with the system turning the screens off after few minutes. The problem is that when I try to activate the screens again one of them does not start anymore (HDMI-0).

In case you need it, here is the output of xrandr -q -command:

Screen 0: minimum 8 x 8, current 6200 x 1920, maximum 32767 x 32767 HDMI-0 connected primary 2560x1440+1080+480 (normal left inverted right x axis y axis) 608mm x 345mm    3840x2160     30.00 +  29.97    25.00    23.98      2560x1440     59.95*     1920x1080     60.00    59.94    50.00    29.97    23.97      1680x1050     59.95      1600x900      60.00      1440x900      59.89      1280x1024     75.02    60.02      1280x800      59.81      1280x720      60.00    59.94    50.00      1152x864      75.00      1024x768      75.03    70.07    60.00      800x600       75.00    72.19    60.32    56.25      720x576       50.00      720x480       59.94      640x480       75.00    72.81    59.94   HDMI-1 connected 1080x1920+0+0 left (normal left inverted right x axis y axis) 527mm x 296mm    1920x1080     60.00*+  59.94    50.00    60.05    60.00    50.04      1600x900      60.00      1280x1024     75.02    60.02      1280x720      60.00    59.94    50.00      1152x864      75.00      1024x768      75.03    60.00      800x600       75.00    60.32      720x576       50.00      720x480       59.94      640x480       75.00    59.94    59.93   DP-0 connected 2560x1440+3640+480 (normal left inverted right x axis y axis) 607mm x 345mm    3840x2160     60.00 +  30.00      2560x1440     59.95*     1920x1080     60.00    59.94      1680x1050     59.95      1600x900      60.00      1440x900      59.89      1280x1024     75.02    60.02      1280x800      59.81      1280x720      60.00      1152x864      75.00      1024x768      75.03    70.07    60.00      800x600       75.00    72.19    60.32    56.25      640x480       75.00    72.81    59.94   DP-1 disconnected (normal left inverted right x axis y axis) DP-2 disconnected (normal left inverted right x axis y axis) DP-3 disconnected (normal left inverted right x axis y axis) 

The problem display is the one with ‘HDMI-0’ label.

Why this code with a for-loop only iterate up to half of the list? when using a while loop it goes through the whole list

I used the pop() method for removing items from a list through iteration, using a for loop led to removal of the half of the values of the list, however, the same code ran with a while loop was successful in removal of all items.

I used both range() function and an input list.

”’a = list(range(20)) print(a) while a!= []: print(a.pop())”’

a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] print(a) for i in a: #>>>>????? print(a.pop())