My gateway router has a cool security feature called Intrusive Threat Prevention (ITS). When I checked the statistics from where most of the attacks occurred to my gateway, majority the attacks come from China.
Friday, December 17, 2021
Friday, December 10, 2021
What is the maximum Transmit Power sent by 5G Iphone?
I have been wondering so far how much power a 5G phone, like iPhone 12, can transmit to RAN (Radio Access Network), a.k.a. a base station.
According to the table in standard document ETSI TS 138 101-1, section 6.2.1 for "UE maximum output power", the maximum power for class 2 is 26 dBm (0.398 Watt) and for class 3 is 23 dBm (0.199 Watt). Class 2 UE (User Element) only transmits at certain frequency bands only, namely n41, n77, n78, and n79, while class 3 transmits in all spectrums.
To understand what are those NR bands, see 5G NR frequency bands - Wikipedia
Tuesday, November 30, 2021
Enabling Older Key Algorithms in SSH
Supposedly the server we want to access is at address 192.168.1.11 and it only supports older key hash algorithms. Add those algorithms in ~/.ssh/config, such as:
KexAlgorithms +diffie-hellman-group1-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1
PubkeyAcceptedAlgorithms +ssh-rsa
HostkeyAlgorithms +ssh-rsa
Host 192.168.1.11
KexAlgorithms +diffie-hellman-group1-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedAlgorithms +ssh-rsa
MACS hmac-md5,hmac-sha1
Monday, November 29, 2021
Some tools to display EXIF data
exifprobe
exiftags
exiftran
exiv2
fim
mediainfo (my favorite)
To install some of those, just install the following:
forensics-all
forensics-extra
Saturday, November 27, 2021
Storage Format for USB Hard Disk
I recently bought a 5 TB USB3 hard disk to back up my data (mostly my photo and video files. I had a data disaster recently, so I bought the EaseUS disaster backup data recovery tool, but it required a huge amount of data to restore).
Out of the box, without paying attention to the factory default format it has (extFAT), the 5 TB space has only about 0.6 TB space left. I doubt I had that much-used data (as the source of the recovered data is from a 1 TB hard drive). After doing some investigation (the detail is down below), I found out that the allocation unit size (AUS) of the removable hard disk is pretty big, I think it is too big to storage average files. So I am in the process of backing up the data to my other hard drive (NTFS, 4k AUS), before I can reformat the drive to have a smaller AUS.
Meanwhile, I am not decided whether to stick with extFAT or change it to NTFS. I don't really care about portability to other OSes, especially Apple products (sorry MacOS!), as I am pretty much a Windows (plus Linux) user. Yes, I am all aware that so far Linux supports R/W to NTFS in userspace only (the kernel driver only supports read and some limited write access, but that requires some enabling). But, the good news is that, according to the recent news, a company called Paragon is willing to make its full-blown proprietary NTFS driver (which fully supports NTFS features) to the Linux community. The effort is planned to be available starting in Kernel 5.15. This will really boost the performance and features of NTFS in Linux.[1]
To have 256K AUS seems too expensive. According to [3] for Test 3 and 4 (Read & Write, 1 GB of data file), extFAT is slightly faster, but for smaller files (Test 1 and 2, 1 GB file size), NTFS prevails. For duplication or deletion (Test 8 and 9), NTFS is more than 1.60 faster than FAT32 and 1.3 faster than extFAT).
Some useful information:
For 2 TB to 16 TB hard drive, 4 KB AUS is enough for an NTFS-formatted hard drive.[2]
Disk Partition Information:
C:\Windows\System32>diskpart
Copyright (C) Microsoft Corporation.
On computer: ASUS-ROGSTRIX-X
Ref:
[1] Linux boosts Microsoft NTFS support as Linus Torvalds complains about GitHub merges | ZDNet
[2] Default cluster size for NTFS, FAT, and exFAT (microsoft.com)
[3] Flexense - Data Management Software - FAT32 vs. exFAT vs. NTFS USB3 Performance Comparison
Thursday, November 18, 2021
Xfinity Superfast still slow
I recently upgraded my Internet connection plan with Xfinity from Internet 200 Mbps plus TV to 900 Mbps Superfast plan (with TV plan dropped. Who cares with TV these days?). It was a good deal plan, as I now pay less with a lot faster nominal Internet speed.
In the beginning, after waiting an hour as told by the customer service, I saw the upstream speed improved to 20+ Mbps, but the upstream speed did not increase (stayed at around 140 Mbps). A few calls/chats with the customer service representatives (they sent a few update signals) and modem and router reboots nothing improved.
After the last call to them, they decided to send a technician to visit the next day. I had tried almost everything (except setting the router's settings to factory defaults). My home network setup is little bit complicated, with the AP router and DOCSIS 3.1 modem sitting in a mounted rack in the walking closet.
The coaxial cable from ISP is split through a 1-to-8 Moca-Ready splitter (5-2300 MHz, -11 dB drop between Out and In), because I need to connect the TV in the living room through MoCA as well as some bedrooms and home office. In the beginning, I thought the chocking was due to interference with MoCA (as the DOCSIS cable modem shared the same coax medium with MoCA modems). Not sure whether I still need to change that splitter (-11 dB drop is a little too much, not counting the bandwidth is only up to 2300, not 2400 or 2500 MHz. But when I checked the MoCA specs, the frequency span for MoCA 2.5 is from 1002 to 1675 MHz.)
Out of my patience (I use the Internet on a daily basis as part of Work From Home with Citrix connection, hence requires constant and speedy internet link), I decided to simplify the connection by removing the set-top box (which soon I'd return as I'd no longer have TV service), so the cable modem was wired directly to the ISP (not through splitter). This did not resolve the data rate, although it improved the SNR in the modem.
Out of my frustration, I factory reset my Synology Router Rt2600a and redid the speed test. And...voila! I got 700+ Mbps. Yes, it's still far from 900 Mbps as promised, but at least it's 4x faster than what I got before. Turned out, the "Threat Prevention" add-on feature in Synology Router was the culprit. It was CPU-intensive processing, which shouldn't be performed by a normal CPU, probably by a special or dedicated CPU doing this kind of inspection and prevention.
I still really need to have an intrusion prevention feature as it has been securing my home network heavily from hackers and spam. Perhaps it is time to shop for a dedicated intrusion prevention device.
Tuesday, October 19, 2021
Upgrading Dell T-3500
Existing System Config
System: Dell Precision WorkStation T3500 (all builds)
Motherboard: Dell 09KPNV
Memory: 5.6 GB free of 12 GB (6x2GB) @ 1.3 GHz DIMM DDR3-1333 (PC3-10600)
Display: 1920 x 1080 - 32 Bit colors, 1680 x 1050 - 32 Bit colors,
OS: Windows 10
BIOS Date: 20130528
CPU: Intel Xeon W3550 (QC, 8 threads @3.06 GHz)
Disk: Seagate Barracuda 7200.12 1TB
VGA: Dual NVidia Quadro NVS 420
Upgradeables
Here is the list parts upgrades.
- For GTX 1070 6-pin to 8-pin PCI Express Power Converter Cable for Video Card
- Video Card EVGA GeForce GTX 1070 SC GAMING ACX 3.0 Black Edition, 08G-P4-5173-KR
- Video Card NVIDIA Founders Edition GeForce GTX 970
- For GTX 970 6 pin PCIe to dual 6+2 pin PCIe splitter Cable for Video Card
- Video Card GIGABYTE GeForce GTX 1050Ti OC Low Profile 4GB, GBTGV-N105TOC-4GL
- Hynix HMT125U6DFR8C-H9 Memory DDR3 1333MHz ( 2GB 2Rx8 DDR3 PC3-10600U )
- Kingston KP223C-ELD Memory DDR3 1333MHz ( 2GB 2Rx8 DDR3 PC3-10600U )
- Samsung 256GB 850 Pro Solid State Drive
- Dell 0R494D R494D Caddy Tray 2.5" - 3.5"
- Seagate 2TB 2.5" Laptop Internal Hard Drive
Power Supply
- EVGA - BR Series 700W ATX12V /EPS12V 80 Plus Power
- EVGA 700BR 100-BR-0700-K1 fits and works fine
CPU:
- Xeon QC X5667 3.06Ghz 12MB 6.40GTs 95W Processor | 3.46Ghz Max Turbo Frequency (SLBVA)
- Xeon QC W5580 3.20Ghz 8MB 6.40GTs 130W Processor | 3.46Ghz Max Turbo Frequency (SLBF2)
- Xeon QC W5590 3.33Ghz 8MB 6.40GTs 130W Processor | 3.6Ghz Max Turbo Frequency (SLBGE)
- Xeon 6C X5670 2.93GHz 12MB 6.4 GT/s LGA1366 Six Core CPU Processor (SLBV7)
- Xeon QC X5677 3.46Ghz 12MB 6.40GTs 130W Processor | 3.73Ghz Max Turbo Frequency (SLBV9)
- Xeon QC X5687 3.6Ghz 12MB 6.40GTs 130W Processor | 3.86Ghz Max Turbo Frequency (SLBVY)
- Xeon 6C X5680 3.33Ghz 12MB 6.40GTs 130W Processor | 3.60Ghz Max Turbo Frequency (SLBV5)
- Xeon 6C W3690 3.46Ghz 12MB 6.40GTs 130W Processor | 3.73Ghz Max Turbo Frequency (SLBW2)
- Xeon 6C X5690 3.46Ghz 12MB 6.40GTs 130W Processor | 3.73Ghz Max Turbo Frequency (SLBVX)
RAM:
DO NOT mix E or U modules (E modules tend to run faster).
T3500 doesn't support registered modules (R modules!), and there is 6 Slots on the motherboard.
Max speed: 1333 MHz (PC10600)
Memory PN’s:
- Hynix HMT125U6DFR8C-H9 Memory DDR3 1333MHz ( 2GB 2Rx8 DDR3 PC3-10600U )
- Kingston KP223C-ELD Memory DDR3 1333MHz ( 2GB 2Rx8 DDR3 PC3-10600U )
- 2GB PC10600U 2Rx8 Non-ECC Unregistered (P223C)
- 2GB PC10600E 1Rx8 ECC Unregistered (DM0KY)
- 2GB PC12800E 1Rx8 ECC Unregisterd (YY90K)
- 4GB PC10600U 2Rx8 Non-ECC Unregistered (P328H)
- 4GB PC10600E 2Rx8 ECC Unregistered (T192H)
- 4GB PC12800E 2Rx8 PC3L ECC Unregistered (6DWFJ)
- 8GB PC12800E 2RX8 PC3 ECC Unregistered (MT18JSF1G72AZ-1G6E1ZF) <---
- 8GB PC12800E 2Rx2 PC3L ECC Unregistered (HMT41GU7AFR8A-PB)
Recommended Memory configurations:
- 6 x 2GB PC10600E or 12800E Modules (12GB)
- 3 x 4GB PC10600E or 12800E Modules (12GB)
- 4 x 4GB PC10600E or 12800E Modules (16GB)
- 6 x 4GB PC10600E or 12800E Modules (24GB)
- 12 GB = 6*2GB SIM DDR3 PC10600 <==== original configuration
- 24 GB = 3*8GB SIMM DDR3 modules
- 32 GB = 4*8GB SIMM DDR3 modules
- 40 GB = 5*8GB SIMM DDR3 modules
- 48 GB = 6 * 8GB SIMM DDR3 modules (Max size!)
GPU
- NVIDIA GTX1050 TI 4GB Graphics Card
- EVGA NVIDIA GTX1660 Ti 6GB Graphics Card
With Upgraded 700W EVG 700B Power Supply:
- EVGA NVIDIA GTX1070 8GB SC Graphics Card
- EVGA NVIDIA GTX1070TI 8GB Graphics Card
- EVGA NVIDIA GTX1080 SC 8GB Graphics Card
- EVGA NVIDIA GTX1080 TI 11GB SC2 ICX Technology Graphics Card
- EVGA NVIDIA RTX 2060 6GB Graphics Card
- EVGA NVIDIA RTX 2060 Super 8GB Graphics Card
- EVGA NVIDIA RTX 2070 8GB Graphics Card
- EVGA NVIDIA RTX 2070 Super Graphics Card
SSD
The motherboard doesn't support NVME protocol, so we cannot boot O/S from it that requires UEFI, which you're not going to find on any eight year old PC system. But NVME SSD can be used to store data after booting (e.g, just to store video game data).
NVME.2 SSD Adapter *Required to Install NVME.2*
Recommended NVME.2 SSDs:
- Samsung 960 EVO Series – 500GB NVMe – M.2 Internal SSD (MZ-V6E500BW)
- Samsung 960 EVO Series – 1TB PCIe NVMe – M.2 Internal SSD (MZ-V6E1T0BW)
- SAMSUNG (MZ-V7S1T0B/AM) 970 EVO Plus SSD 1TB - M.2 (w/ M key)
- SAMSUNG (MZ-V8V1T0B/AM) 980 SSD 1TB - M.2 NVMe Interface Internal Solid State Drive with V-NAND Technology
Misc:
- Heatsink compound Arctic Silver
M.2 is a form factor:
- 2240 (40 mm height)
- 2260 (60 mm height)
- 2280 (80 mm height)
NVME SSD vs SATA SSD:
SATA III Hard Drive SATA III SSD NVMe SSD
- ~100 MB/s Read 530 MB/s Read 3,500 MB/s Read
- ~100 MB/s Write 500 MB/s Write 3,000 MB/s Write
Sunday, May 9, 2021
Make Citrix work in Linux
exportICAROOT=/opt/Citrix/ICAClientCopy files in/usr/share/ca-certificates/mozilla/* to$ICAROOT/keystore/cacertsRehash the certificate by the following command: $ICAROOT/util/ctx_rehash
- Reopen Citrix Receiver.
Sunday, February 21, 2021
Logitech Speakerphone with Linux Mint
My Logitech USB Speakarphone has stopped working since I did something wrong (which I don't remember). Various troubleshooting and zillions of searches on the Internet did not fix the issue, until today.
The issue was the device did not make any sound at all. Checking via ALSA and Kernel log said everything was fine as shown below:
$ lsusb
...
Bus 002 Device 011: ID 046d:0a06 Logitech, Inc.
Bus 002 Device 009: ID 046d:c51c Logitech, Inc.
$ inxi -A
Audio: Device-1: Intel 82801I HD Audio driver: snd_hda_intel
Device-2: ViXS Systems XCode 2100 Series driver: N/A
Device-3: AMD Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series] driver: snd_hda_intel
Device-4: Logitech type: USB driver: snd-usb-audio
Sound Server: ALSA v: k4.15.0-135-generic
Friday, February 19, 2021
Rename files with Regex rule
In Linux, there is very powerful tool to rename files based on pattern we specify. The pattern follows Perl-like regular expression.
For example, if I have files as follow:
01_-_bohemian_rhapsody_-_queen_-_greatest_hits_cd1.mp3
05_-_bicycle_race_-_queen_-_greatest_hits_cd1.mp3
"07_-_it's_a_hard_life_-_queen_-_greatest_hits_cd2.mp3"
09_-_who_wants_to_live_forever_-_queen_-_greatest_hits_cd2.mp3
11_-_the_miracle_-_queen_-_greatest_hits_cd2.mp3
15_-_friends_will_be_friends_-_queen_-_greatest_hits_cd2.mp3
16_-_the_show_must_go_on_-_queen_-_greatest_hits_cd2.mp3
16_-_we_will_rock_you_-_queen_-_greatest_hits_cd1.mp3
17_-_we_are_the_champions_-_queen_-_greatest_hits_cd1.mp3
and I want to rename them by replacing the "_-_" part to be just "-". The single command to do that is:
$ rename -n -v 's/_-_/-/g' *
rename(01_-_bohemian_rhapsody_-_queen_-_greatest_hits_cd1.mp3, 01-bohemian_rhapsody-queen-greatest_hits_cd1.mp3)
rename(05_-_bicycle_race_-_queen_-_greatest_hits_cd1.mp3, 05-bicycle_race-queen-greatest_hits_cd1.mp3)
rename(07_-_it's_a_hard_life_-_queen_-_greatest_hits_cd2.mp3, 07-it's_a_hard_life-queen-greatest_hits_cd2.mp3)
rename(09_-_who_wants_to_live_forever_-_queen_-_greatest_hits_cd2.mp3, 09-who_wants_to_live_forever-queen-greatest_hits_cd2.mp3)
rename(11_-_the_miracle_-_queen_-_greatest_hits_cd2.mp3, 11-the_miracle-queen-greatest_hits_cd2.mp3)
rename(15_-_friends_will_be_friends_-_queen_-_greatest_hits_cd2.mp3, 15-friends_will_be_friends-queen-greatest_hits_cd2.mp3)
rename(16_-_the_show_must_go_on_-_queen_-_greatest_hits_cd2.mp3, 16-the_show_must_go_on-queen-greatest_hits_cd2.mp3)
rename(16_-_we_will_rock_you_-_queen_-_greatest_hits_cd1.mp3, 16-we_will_rock_you-queen-greatest_hits_cd1.mp3)
rename(17_-_we_are_the_champions_-_queen_-_greatest_hits_cd1.mp3, 17-we_are_the_champions-queen-greatest_hits_cd1.mp3)
(the argument "-n" above is to tell rename not to actually perform renaming, but just to display what it would do). I use "/g" in the regular expression to tell it to rename all occurrences of "_-_" throughout the file name, not just for the first time it encounters it.
Linux script to display Some information of MP3 files
The following bash script utilizes mediainfo command line to retrieve various metadata inside an MP3 (or any media file, in fact):
#!/bin/sh i=0 for f in "$@" do i=$((i+1)) printf "%d," $i mediainfo --Inform="General;%CompleteName%,%Format%,%OverallBitRate_Mode%,%BitRate%,%FileSize/String4%" "${f}" done
For example (I put the above into a script named 'bitrate.sh'):
1,01_-_bohemian_rhapsody_-_queen_-_greatest_hits_cd1.mp3,MPEG Audio,CBR,256000,10.94 MiB
2,05_-_bicycle_race_-_queen_-_greatest_hits_cd1.mp3,MPEG Audio,CBR,256000,5.612 MiB
3,07_-_it's_a_hard_life_-_queen_-_greatest_hits_cd2.mp3,MPEG Audio,CBR,256000,7.620 MiB
4,09_-_who_wants_to_live_forever_-_queen_-_greatest_hits_cd2.mp3,MPEG Audio,CBR,256000,9.075 MiB
5,11_-_the_miracle_-_queen_-_greatest_hits_cd2.mp3,MPEG Audio,CBR,256000,9.002 MiB
6,15_-_friends_will_be_friends_-_queen_-_greatest_hits_cd2.mp3,MPEG Audio,CBR,256000,7.599 MiB
7,16_-_the_show_must_go_on_-_queen_-_greatest_hits_cd2.mp3,MPEG Audio,CBR,256000,8.048 MiB
8,16_-_we_will_rock_you_-_queen_-_greatest_hits_cd1.mp3,MPEG Audio,CBR,256000,3.741 MiB
9,17_-_we_are_the_champions_-_queen_-_greatest_hits_cd1.mp3,MPEG Audio,CBR,256000,5.542 MiB
Sunday, December 20, 2020
Plex Server inaccessible with LG TV nor Ipone
I recently had access issue to my Plex server (running on Linux). It was fine sometime ago, but lately everytime I tried to access it from my LG TV or my phone, they said the server was offline. I'd followed various instructions and troubleshooting I found on the Internet with no luck. Here is the list of steps I did:
- Ensure no VPN running on all devices and server
- Select "Preferred" for secure connection
- Added my private subnet in the "List of IP addresses and networks that are allowed without auth"
- Upgrade the Plex server to the latest
- Restart the server (e.g., "sudo service plexmediaserver restart")
- Verify I am able to access the server through its IP (e.g, http://192.168.1.103:32400)
- Enable DLNA server
- Revert the Plex on TV to last publicly available version
- Power down TV, wait 2 minutes and turn it back on
Turned out it was due to IPv6 connection was enabled on the Plex server! Once I disabled it, now I could watch my movies or stream my music to other devices. My LG TV apparently did not support IPv6 yet.
Saturday, November 14, 2020
My Indentation configuration
The content of $HOME/.indent.pro:
-as
-lp
-bad
-bap
-bbb
-bbo
-bli0
-nbc -c33 -cd33 -ncdb -nce -ci4 -cli0
-c4
-ncdw
-cp33 -cs -d0 -di1 -nfc1 -nfca -hnl -i8 -ip0 -l75 -lp -npcs
-nprs -npsl -saf -sai -saw -nsc -nsob -nss
-v
Sunday, July 5, 2020
Refoss Smart Wi-Fi Garage Door Opener
nmap -O -sO 192.168.1.55
WARNING: Disabling OS Scan (-O) as it is incompatible with the IPProto Scan (-sO)
Starting Nmap 7.80 ( https://nmap.org ) at 2020-07-05 21:44 Pacific Daylight Time
Nmap scan report for 192.168.1.55
Host is up (0.021s latency).
Not shown: 252 closed protocols
PROTOCOL STATE SERVICE
1 open icmp
6 open tcp
17 open udp
41 open|filtered ipv6
MAC Address: 48:E1:E9:51:07:50 (Chengdu Meross Technology)