hd-idle is a useful program if you want to spin down hard disks after a defined time period.
It is available in fedora repositories. Therefore you can install it using dnf command,
dnf install hd-idle
systemd unit file is available in below path,
/usr/lib/systemd/system/hd-idle.service
The configuration file is available in below path,
/etc/sysconfig/hd-idle
man page of hd-idle (man hd-idle) describes the usage of hd-idle program. It has capability to define a default idle time for all the disks and define idle time for disks individually.
The default log file path is,
/var/log/hd-idle/hd-idle.log
All the informatiion about this utility can be found here,
http://hd-idle.sourceforge.net/
Tuesday, November 20, 2018
How to add and remove default gateway on Mac OS
Command to delete the default route,
sudo route delete default
Command to add a default route,
sudo route add default <default gateway IP>
sudo route delete default
Command to add a default route,
sudo route add default <default gateway IP>
How to turn off IPV6 of an interface on MacOS
Command to list the network services,
networksetup -listallnetworkservices
output of the command,
anons-iMac:~ anon$ networksetup -listallnetworkservices
An asterisk (*) denotes that a network service is disabled.
Ethernet
iPhone USB
Command to turn IPV6 off for a particular network service (in this case Ethernet and iPhone USB are the network services I want to modify),
networksetup -setv6off Ethernet
networksetup -setv6off 'iPhone USB'
networksetup -listallnetworkservices
output of the command,
anons-iMac:~ anon$ networksetup -listallnetworkservices
An asterisk (*) denotes that a network service is disabled.
Ethernet
iPhone USB
Command to turn IPV6 off for a particular network service (in this case Ethernet and iPhone USB are the network services I want to modify),
networksetup -setv6off Ethernet
networksetup -setv6off 'iPhone USB'
Sunday, November 4, 2018
Configure Google Chrome to stop opening 5353 port for listening
Today I have noticed that Google Chrome opens a UDP listening port 5353 whenever I open the browser.
After searching about it, I found this solution shuts down the port,
Create a file under /etc/opt/chrome/policies/managed directory
e.g.: blockport.json
Add this line to the file,
{ "EnableMediaRouter": false }
Finally it will look like this,
[root@localhost ~]# cat /etc/opt/chrome/policies/managed/blockport.json
{ "EnableMediaRouter": false }
Restart the browser. It will not open the port anymore.
Source: https://unix.stackexchange.com/questions/187294/chromium-browser-pepperflashplugin-opening-listening-ports-on-0-0-0-05353
Update,
For latest Google Chrome instances, Above method didn't work and I have found out that disabling "Show notifications when new printers are detected on the network" shutdown port 5353. Please note that I'm using Version 81.0.4044.129 (Official Build) (64-bit) on MacOS
After searching about it, I found this solution shuts down the port,
Create a file under /etc/opt/chrome/policies/managed directory
e.g.: blockport.json
Add this line to the file,
{ "EnableMediaRouter": false }
Finally it will look like this,
[root@localhost ~]# cat /etc/opt/chrome/policies/managed/blockport.json
{ "EnableMediaRouter": false }
Restart the browser. It will not open the port anymore.
Source: https://unix.stackexchange.com/questions/187294/chromium-browser-pepperflashplugin-opening-listening-ports-on-0-0-0-05353
Update,
For latest Google Chrome instances, Above method didn't work and I have found out that disabling "Show notifications when new printers are detected on the network" shutdown port 5353. Please note that I'm using Version 81.0.4044.129 (Official Build) (64-bit) on MacOS
Tuesday, August 14, 2018
Avoid WebRTC leak if you use browser + VPN or SSH Tunnel
I have been using a SSH tunnel (Please see this post for the instructions, http://swapoff.blogspot.com/2018/03/how-to-create-ssh-tunnel-and-use-it-for.html) for web browsing via Firefox.
I used it to forward DNS queries well. So I thought I'm pretty much safe until I read about WebRTC feature in web browsers.
WebRTC allows P2P communication for real time communication in web browsers. WebRTC can be used to get your true IP address via STUN requests with browsers, even when you are using a VPN or SSH tunnel.
You can check whether WebRTC is enabled using several methods, but checking it via a web application is easier than any other methods. e.g.: https://browserleaks.com/webrtc
To disable WebRTC in firefox, set media.peerconnection.enabled to false via about:config
I used it to forward DNS queries well. So I thought I'm pretty much safe until I read about WebRTC feature in web browsers.
WebRTC allows P2P communication for real time communication in web browsers. WebRTC can be used to get your true IP address via STUN requests with browsers, even when you are using a VPN or SSH tunnel.
You can check whether WebRTC is enabled using several methods, but checking it via a web application is easier than any other methods. e.g.: https://browserleaks.com/webrtc
To disable WebRTC in firefox, set media.peerconnection.enabled to false via about:config
Subscribe to:
Posts (Atom)