Showing posts with label Internet. Show all posts
Showing posts with label Internet. Show all posts

Sunday, March 15, 2026

Privacy, telemetry, data collection

https://librewolf.net/

LibreWolf — privacy enhanced Firefox gets much better results on https://coveryourtracks.eff.org

sudo apt update && sudo apt install extrepo -y

sudo extrepo enable librewolf && sudo extrepo update librewolf

sudo apt update && sudo apt install librewolf -y

Any program that uses web UI via web-server may leak internal LAN IP-address of the device, for example IP Webcam for Android does this in Referrer. F12 > Dev Tools > Network > check what requests app makes. Any API is potential channel for leaking user data. Be cautions when using proprietary apps in sensitive environment. FOSS is better in such cases, else decompile, modify, rebuild.

https://www.privoxy.org/user-manual/quickstart.html

https://docs.searxng.org/

sudo ufw enable

sudo apt install tor

torsocks --version

sudo systemctl enable tor      // start on boot

sudo systemctl start tor          // start now

sudo systemctl status tor       // check if running

torsocks curl https://check.torproject.org

CLI browsers are not safe browsers. Using w3m/lynx to “avoid JS” doesn’t make sense for anonymity; you’re trading usability and security for terminal UI. CLI inside a Tor-based system is safe way: Whonix, Tails (easiest).

Ordinary goofy will say that he has nothing to hide, but he do not take into account regime change, idiotic laws and limitations that may be in future... The less data you share, the better. Nobody has right to poke nose in your LAN, hardware, behavior, business...

Monday, March 9, 2026

KTorrent not seeding and not downloading

Forward only 6881 for tcp and udp in router or choose another port. Paste it for TCP, mtp, DHT, apply and other ports will be changed automatically.

sudo ufw enable

sudo ufw allow 6881/tcp

sudo ufw allow 6881/udp

sudo ufw reload

netstat -plunt | grep ktorrent

tcp        0      0 PC_IP:6881              0.0.0.0:*       LISTEN       60908/ktorrent

udp        0      0 PC_IP:6881             0.0.0.0:*                           60908/ktorrent

udp        0      0 PC_IP:UDPtrackers 0.0.0.0:*                           60908/ktorrent

udp        0      0 PC_IP:UDP_DHT    0.0.0.0:*                           60908/ktorrent


KTorrent opens with empty torrents list

nano ~/.config/ktorrentrc

Check saveDir=/path/torrents/

tempDir=/path/ktorrent/ // default location => /home/$USER/.local/share/ktorrent/

Make tempDir=/path/torrents/ktorrent/ // your actual path to tor0+ dirs

KTorrent stores its settings in ~/.config/ktorrentrc. If the application crashes, your system runs out of disk space, or a desktop environment update occurs, this file can occasionally corrupt or reset to factory defaults. When it resets, KTorrent reverts to its default temporary directory path (~/.local/share/ktorrent/) [1] and instantly forgets about your custom folder.


Tuesday, February 10, 2026

Linux firewall ufw settings for local PC

sudo ufw enable

sudo ufw default deny incoming


sudo ufw allow from 192.168.1.0/24 to any port *****

sudo ufw allow from 192.168.1.0/24 to any port ***** proto udp

sudo ufw allow from 192.168.1.0/24 to any port ****

sudo ufw allow from 192.168.1.0/24 to any port 22

sudo ufw allow from 192.168.1.0/24 to any port 3389

sudo ufw allow from 192.168.1.0/24 to any port 445 proto tcp


sudo ufw status verbose


ss -tulpn

upnpc -l

curl ifconfig.me // compare with PC public ISP IP

nmap -p **,****,***** IP-address (check PC and ISP)

ip a

ip -4 addr

ip -6 addr // global address (not fe80::)

nmap -6 -p ****,***** YOUR_IPV6

Sunday, February 8, 2026

IP Webcam auto file download via SFTP

sudo apt install openssh-server

systemctl status ssh

hostname -I

ifconfig

ip a


sudo adduser ftpdrop

[sudo] password for user:

info: Adding user `ftpdrop' ...

Is the information correct? [Y/n] y

info: Adding new user `ftpdrop' to supplemental / extra groups `users' ...

info: Adding user `ftpdrop' to group `users' ...


id ftpdrop

groups ftpdrop

getent group users // show users in group

sudo deluser ftpdrop users // remove user from group


ssh-keygen -t ed25519 -f ~/ftpdrop_key

Generating public/private ed25519 key pair.


sudo mkdir /home/ftpdrop/.ssh

sudo nano /home/ftpdrop/.ssh/authorized_keys

Paste contents of /home/user/ftpdrop_key.pub


sudo chown -R ftpdrop:ftpdrop /home/ftpdrop/.ssh

sudo chmod 700 /home/ftpdrop/.ssh

sudo chmod 600 /home/ftpdrop/.ssh/authorized_keys

sudo systemctl restart ssh


"Algrotirhm Parameters EC implementation not found" on phone

Saturday, February 7, 2026

IP Webcam manual bulk file download

Open http://192.168.1.10:8080/videomgr.html#/modet in Firefox

F12 → Console


Add Set to remove duplicates:

[...new Set(

  [...document.querySelectorAll("a[href*='/v/modet/']")].map(a => a.href)

)].join("\n")

Explanation:

querySelectorAll → all <a>

map(a => a.href) → array of hrefs

new Set(...) → keeps only unique values

[...new Set(...)] → back to array for join("\n")


Copy output → save as list.txt

mkdir ipcam10

nano list.txt → Ctrl + Shift + V

mv list.txt ipcam10

wget -i list.txt --base=http://192.168.1.10:8080/v/modet/

Monday, August 21, 2023

Check proxy server on Kubuntu Linux

curl -v -x 136.144.178.240:80 http://www.google.com

*   Trying 136.144.178.240:80...
* Connected to 136.144.178.240 (136.144.178.240) port 80 (#0)
> GET http://www.google.com/ HTTP/1.1
> Host: www.google.com

Saturday, August 19, 2023

Analyze network activity on Kubuntu in real-time

sudo tcpdump // command-line packet analyzer that captures network traffic in real-time

sudo tcpdump -w /path/to/log.pcap // pcap format is used by Wireshark

sudo tcpdump -i <interface> -l | tee /dev/tty | sudo tcpdump  -w /media/user/folder/tcpdump_log.pcap // problem with buffering while displaying real-time in terminal

sudo tcpdump -i <interface> | tee /dev/tty | sudo tcpdump -l -U -G 600 -w /media/user/folder/tcpdump_log-%Y%m%d%H%M%S.pcap // won't help

sudo tcpdump -l -i any | tee -a /media/user/folder/tcpdump_log-$(date '+%Y%m%d%H%M%S').pcap // works but creates incompatible file with Wireshark

tcpdump -l -i any -qn port 53 | tee -a /tmp/dnslogs

sudo nano capture_traffic.sh

#!/bin/bash

# Set the path for the pcap file
PCAP_PATH="/media/user/directory/tcpdump_log-$(date '+%Y%m%d%H%M%S').pcap"

# Run tcpdump to capture traffic and display in terminal, saving to file in background
sudo tcpdump -i enp -l -w "$PCAP_PATH" &

# Run tcpdump to capture traffic and display in terminal
sudo tcpdump -i enp -l | tee /dev/tty

sudo chmod +x capture_traffic.sh

./capture_traffic.sh


sudo apt install wireshark // graphical network protocol analyzer

Ctrl + Shift + P >Name Resolution > Resolve network (IP) addresses // in Wireshark

sudo dpkg-reconfigure wireshark-common > Yes // if u have permission problem

sudo usermod -a -G wireshark {your username}

sudo setcap cap_net_raw,cap_net_admin=ep {path/to/}dumpcap

Restarting Wireshark.

sudo wireshark


sudo dhclient

ping 8.8.8.8

ip link

nmcli

nmcli dev status

sudo lshw -class network

netstat

route

ss // (Socket Statistics) network sockets, network connections and network interfaces

ss -t -a -n // all established TCP connections

ss -u -l -n // listening UDP sockets

sudo apt install traceroute

  • -n: Show IP addresses instead of resolving hostnames.
  • -m max_ttl: Set the maximum number of hops to reach the destination.
  • -q nqueries: Specify the number of probes per hop.
  • -w waittime: Set the timeout for each probe.

traceroute -n -m 30 -q 3 -w 2 www.google.com

Sunday, August 6, 2023

No network connection on Kubuntu Plasma Desktop

sudo dhclient

ping 8.8.8.8

ip link

nmcli

nmcli dev status

sudo apt install plasma-nm

sudo apt install network-manager

sudo nano /etc/NetworkManager/NetworkManager.conf // didn't work out

[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

[device]
wifi.scan-rand-mac-address=no

change the line managed=false to managed=true // no effect

Add following:

[keyfile]

unmanaged-devices=none; OR for multiple devices

unmanaged-devices=none;your-device-name; // device name => ls /sys/class/net || ip link || nmcli

sudo service network-manager restart // didn't work

sudo systemctl restart NetworkManager

Failed to restart network-manager.service: Unit network-manager.service not found.

sudo apt reinstall network-manager

systemctl status NetworkManager

nmcli dev show // make sure device is managed

Reset Network Device Configuration:

sudo ifconfig device-name 0.0.0.0 down // didn't work

sudo ip addr flush dev device-name // didn't work

/etc/network/interfaces && /etc/sysconfig/network-scripts/ // Network Configuration Files

nmcli con show // list all existing NetworkManager connections names

nmcli con mod "Wired connection 1" ipv4.addresses ''
nmcli con mod "Wired connection 1" ipv4.gateway ''
nmcli con mod "Wired connection 1" ipv4.dns ''

nmcli con show 'Wired connection 1'

sudo systemctl restart NetworkManager

nmcli dev show  // look for state change

BEFORE => GENERAL.STATE:                          10 (unmanaged)

NOW => GENERAL.STATE:                          100 (connected (externally))

SOLVED! => NM works and connection is UP from the start

Saturday, August 5, 2023

Problems and glitches in Mozilla Firefox

Enter key creates space instead sending prompt in Firefox. On Google search page in search field Enter key enters space. Firefox ESR on Kubuntu Linux. Solution:

In my case disabling AdBlocker extension solved the problem => Disable on this site option.

Saturday, December 31, 2022

Windows 7 does not see other network PCs

Go to Control Panel Network Settings

1. Leave homegroup.

2. "See Full Map" in right upper corner to show network devices.

In VirtualBox go to Settings > Network > Attached to > Bridged Adapter.

ping 192.168.1.1

Reset network settings in cmd, if necessary:

ipconfig /release

ipconfig /renew

ipconfig /flushdns

Saturday, December 10, 2022

USB Internet tethering on Kubuntu not working

Samsung M22 smartphone. Activate USB tethering and share mobile connection with PC. If you can’t connect to Internet, disable PC wired connection (LAN) and leave phone wired connection. Don’t forget to activate PC wired connection after disconnecting phone.

Tuesday, November 1, 2022

Server error messages in Node.js

 //

app.use((err, req, res, next) => {
console.log(err);
err.statusCode = err.statusCode || 500;
err.status = err.status || 'error';
res.status(err.statusCode).json({
status: err.status,
message: err.message,
}); // {"status":"fail","message":"Page / not found!"}
next();
});

//

Express req request Node.js

Show Express req content:

app.all('*', (req, res, next) => {
console.log(req);
});

Sunday, October 30, 2022

Run client & server in separate folders

Node.js server and React client:

"scripts": {
"install-server": "cd server && npm install",
"install-client": "cd client && npm install",
"install": "npm run install-server && npm run install-client",
"server": "cd server && npm run watch",
"client": "cd client && npm start",
"watch": "npm run server & npm run client",
"test": "echo \"Error: no test specified\" && exit 1"
},

Node.js server and React client:

"scripts": {
"install-server": "npm install --prefix server",
"install-client": "npm install --prefix client",
"install": "npm run install-server && npm run install-client",
"server": "npm run watch --prefix server",
"client": "npm start --prefix client",
"watch": "npm run server & npm run client",
"deploy": "npm run build --prefix client && npm start --prefix server",
"test": "npm test --prefix server & npm test --prefix client"
},

//

Thursday, October 27, 2022

http Node.js module status codes

node > http

STATUS_CODES: {
   '100': 'Continue',
   '101': 'Switching Protocols',
   '102': 'Processing',
   '103': 'Early Hints',
   '200': 'OK',
   '201': 'Created',
   '202': 'Accepted',
   '203': 'Non-Authoritative Information',
   '204': 'No Content',
   '205': 'Reset Content',
   '206': 'Partial Content',
   '207': 'Multi-Status',
   '208': 'Already Reported',
   '226': 'IM Used',
   '300': 'Multiple Choices',
   '301': 'Moved Permanently',
   '302': 'Found',
   '303': 'See Other',
   '304': 'Not Modified',
   '305': 'Use Proxy',
   '307': 'Temporary Redirect',
   '308': 'Permanent Redirect',
   '400': 'Bad Request',
   '401': 'Unauthorized',
   '402': 'Payment Required',
   '403': 'Forbidden',
   '404': 'Not Found',
   '405': 'Method Not Allowed',
   '406': 'Not Acceptable',
   '407': 'Proxy Authentication Required',
   '408': 'Request Timeout',
   '409': 'Conflict',
   '410': 'Gone',
   '411': 'Length Required',
   '412': 'Precondition Failed',
   '413': 'Payload Too Large',
   '414': 'URI Too Long',
   '415': 'Unsupported Media Type',
   '416': 'Range Not Satisfiable',
   '417': 'Expectation Failed',
   '418': "I'm a Teapot",
   '421': 'Misdirected Request',
   '422': 'Unprocessable Entity',
   '423': 'Locked',
   '424': 'Failed Dependency',
   '425': 'Too Early',
   '426': 'Upgrade Required',
   '428': 'Precondition Required',
   '429': 'Too Many Requests',
   '431': 'Request Header Fields Too Large',
   '451': 'Unavailable For Legal Reasons',
   '500': 'Internal Server Error',
   '501': 'Not Implemented',
   '502': 'Bad Gateway',
   '503': 'Service Unavailable',
   '504': 'Gateway Timeout',
   '505': 'HTTP Version Not Supported',
   '506': 'Variant Also Negotiates',
   '507': 'Insufficient Storage',
   '508': 'Loop Detected',
   '509': 'Bandwidth Limit Exceeded',
   '510': 'Not Extended',
   '511': 'Network Authentication Required'
 },

https://nodejs.org/api/http.html

Monday, October 24, 2022

Request logger for Node.js server

@desc    Logs request to console

const logger = (req, res, next) => {
console.log(
`${req.method} ${req.protocol}://${req.get('host')}${req.originalUrl}`
);
next();
};

module.exports = logger;

Morgan - HTTP request logger middleware for node.js

https://www.npmjs.com/package/express-requests-logger

https://github.com/expressjs/morgan

npm i morgan

TypeError('Router.use() requires a middleware function

throw new TypeError('Router.use() requires a middleware function but got a ' + gettype(fn))

Check module.exports = ...

Monday, October 17, 2022

Cross-origin resource sharing (CORS) with Express Node.js

https://www.stackhawk.com/blog/react-cors-guide-what-it-is-and-how-to-enable-it/

////////////////////////////////////////////////////////
// Cross-origin resource sharing (CORS)
////////////////////////////////////////////////////////
const cors = require('cors');
app.use(cors());

app.get(
'url',
function (req, res, next) {
res.header('Access-Control-Allow-Origin', '*');
res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE');
res.header(
'Access-Control-Allow-Headers',
'Origin, X-Requested-With, Content-Type, Accept'
);
res.json({ msg: 'This is CORS-enabled for all origins!' });
next();
}
);

app.listen(8080, '127.0.1.1', function () {
console.log('CORS-enabled web server listening on port 8080');
});

https://stackoverflow.com/questions/43262121/trying-to-use-fetch-and-pass-in-mode-no-cors

https://stackoverflow.com/questions/35068712/error-listen-eacces-0-0-0-080-osx-node-js

https://www.section.io/engineering-education/how-to-use-cors-in-nodejs-with-express/

https://levelup.gitconnected.com/getting-rid-of-origin-has-been-blocked-by-cors-policy-forever-969e161421ca

https://medium.com/@dtkatz/3-ways-to-fix-the-cors-error-and-how-access-control-allow-origin-works-d97d55946d9

https://enable-cors.org/server_expressjs.html

https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#preflighted_requests

https://stackoverflow.com/questions/36878255/allow-access-control-allow-origin-header-using-html5-fetch-api