Skip to main content

New answers tagged

0 votes

How to reset nftable counter?

I found 2 ways to reset anonymous counters. Tested with kernel 5.15.0-121-generic and nftables 1.0.2-1ubuntu3 on Ubuntu 22.04.4. (May or may not work with vanilla kernel and nftables... maybe it's ...
Peter's user avatar
  • 2,906
0 votes

How to disabling certain UDP service ports?

Use: iptables -I INPUT -p udp --dport 111 -j DROP or iptables -I INPUT -p udp --dport 111 -j REJECT Replace 111 with the port number you want to block.
Entexion's user avatar
0 votes

How to prevent Avahi adding -2 to hostnames

On an RPi with console autologin, I added sudo service avahi-daemon restart at the end of .bashrc.
Francois Corthay's user avatar
0 votes

socat forwarding to multiple addresses

I had the same use-case, I wanted multiple ports forwarded. I found this answer in another thread. https://unix.stackexchange.com/a/751459
harre's user avatar
  • 1
0 votes

Service start request repeated too quickly, refusing to start limit

In my case, running Saltstack to install the package, copy files and start the service, the root cause was the configuration file for the service needing to have rw------- (0600) permissions. I was ...
user67073's user avatar
0 votes

How to force delete directory backed by Gluster that will not delete even when using -r option

In some cases, You won't have any other choice but to delete from the backend: meaning on each node then on each brick of the node. glusterfs 5.5 on debian 10 (buster)
Martin Luther ETOUMAN's user avatar
0 votes

Apache mod QOS is blocking all users when it should only block per IP

if you are using a reverse proxy, try using QS_ClientIpFromHeader X-Forwarded-For instead of remoteIP <IfModule mod_qos.c> QS_ClientIpFromHeader X-Forwarded-For QS_ClientEventLimitCount ...
Jackson Castilho's user avatar
0 votes

Ansible: how to explain that sometimes $HOME environment variable is set and sometimes not?

No, lookups do not use the become system. So expressions like lookup('env') are run as the user running ansible-playbook. Actually, the only thing become can affect is modules, and they are run in ...
John Mahowald's user avatar
0 votes

ssh hostname.local on LAN? Why does it work?

special use domain names are not resolved through the internet. https://www.iana.org/assignments/special-use-domain-names/special-use-domain-names.xhtml and "local" is one of these domain ...
SmileMZ's user avatar
  • 131
0 votes

iostat - dm-0 device shows much higher latencies than sdX

Average request duration = Total request duration/Number of requests. In some cases, the number of requests is not calculated within several seconds. As a result, the denominator is too small and the ...
ludapei's user avatar
0 votes

How to find the browser versions from command-line in Linux & Windows?

[ "$(google-chrome --version | grep -oP '\d+(.\d+)+')" != "$(curl -sSL https://dl.google.com/linux/chrome/deb/dists/stable/main/binary-amd64/Packages | grep -A 1 "Package: google-...
user180173's user avatar
4 votes

Disable encryption on wireguard

Wireguard doesn't support plaintext tunnelling, its not meant to. I think using a pubilc facing tunnel without securing the packets is not a sound idea. I'd be very surprised if your latency ...
Matthew Ife's user avatar
  • 23.9k
2 votes
Accepted

Obtain a list of RPM packages to update a system

Based on this answer you can get the history of dnf executions with the commands dnf history then you select which of the history ID you want to see in details with command: dnf history info <ID&...
Romeo Ninov's user avatar
  • 6,312
0 votes

get notification when systemd-monitored service enters failed state

The OnFailure= service way is the most "systemd way" I think. Other ways: ExecStopPost= will execute after the service is stopped, where you can then check $SERVICE_RESULT with bash. ...
qwr's user avatar
  • 111
1 vote

Steps to succesfully persistent iSCSI LUN using Open-iSCSI on Ubuntu Server?

All iSCSI is doing is presenting a block device, but it still needs to be formatted with a filesystem before it can be mounted. This has (2) parts: a) Partitioning: So in the output of fdisk -l find ...
F1Linux's user avatar
  • 415
1 vote
Accepted

Fresh rocky9 install causing PCI bus errors?

The workaround/solution for this is published by Red Hat: https://access.redhat.com/solutions/7062084 You can downgrade to kernel 5.14.0-284.11.1.el9_2 Or you can add the following parameter to the ...
ewwhite's user avatar
  • 199k
1 vote

where is the updatedb database located?

The most advanced variant of locate today is plocate and its DB is usually stored at /var/lib/plocate/plocate.db plocate is used at least by Fedora and openSUSE Tumbleweed as a default locate program....
berezovskyi's user avatar
2 votes
Accepted

COW filesystems (BTRFS, ZFS, bcachefs) scrubbing and RAID1 with mdadm on Linux

Yes, when running on top of mdadm the ZFS, etc. scrub can not correct corruption that happend to the individual disks. That is one of the main reasons why those filesystems strongly prefer direct ...
Momi_V's user avatar
  • 36
1 vote

Run a shell script as a different user

For sites that may have special PAM setups that make this difficult, you can bypass su/sudo entirely with systemd and a little more typing: Define a oneshot service that executes your script. If your ...
pphysch's user avatar
  • 11
2 votes

CLI tool to monitor file size growth, transfer rate, and calculate progress bar/ETA?

You can do this relatively easily using tqdm. Something like this seems to do what you want, assuming that you know the expected size of the target file in advance: # expected total file size in bytes ...
larsks's user avatar
  • 46k
2 votes

Poor network bandwidth on a point to point connection between 2 linux machines with Mellanox ConnectX-6 cards

server grade rackmount systems - what are those systems and specifically which slot have you plugged the NIC in? The MT28908 ConnectX-6 supports PCIe 4.0 x16 with a theoretical bandwidth of up to 252 ...
Zac67's user avatar
  • 12.6k
0 votes

How to add youtube into ip rule list?

You can perform DNS lookups to get the current IP addresses for YouTube: Using dig: dig +short A youtube.com This command will return the A records (IPv4 addresses) for youtube.com. Using nslookup: ...
JG91's user avatar
  • 11
1 vote

ssh blank passphrase but still asking for it

A trailing space after END OPENSSH PRIVATE KEY----- causes openssh to treat the ssh key as encrypted and just hitting enter at the prompt doesn't work. I verified this on RH 7.9 and openssh_7.4p1 ...
cneberg's user avatar
  • 11
0 votes

How to change the text of Emails sent by sudo via mail_badpass?

It's always a good idea to start by reading the manual - and specifically the manual already installed on your machine. That way you know you're getting the right documentation for the right version ...
symcbean's user avatar
  • 23.2k
0 votes

How to add a timestamp to bash script log?

The best way for me is to define a function echo_ts and use it in my script instead of the built-in echo command: echo_ts() { local timestamp=$(date +"%Y-%m-%d %T") echo "[$...
Rea Haas's user avatar
  • 101
0 votes

Allowing and restricting access to specific URL in Apache 2.4

More generally I'd go for the Location bit since /var/www/html/ does not contain necessarily contain the published url files: <Location /admin> Require ip 1.2.3.4 </Location&...
rosch's user avatar
  • 101
0 votes

Connect two networks over a VPN connection linux

The important bit was that I was using Wireguard, so adding the subnets to allowedIPs in the WG client configs and the appropriate routes was all that was needed.
is_this_taken's user avatar
1 vote
Accepted

How to modify /etc/hosts file for root domain in a vps server?

Your domain changes are okay, but even if you intend to put a whole FQDN in /etc/hostname, you should still make sure that the short hostname (i.e. just the first component, example in your case) also ...
u1686_grawity's user avatar
0 votes

Manage VLANs on Linux Bridge and KVM host

After a lot of attempts, seems like linux bridges can't do what i want with KVM. The only "solution" I have found is the following: bond1 -> bridge data ( vlan-filtering1 ) -> veth (...
Gianmasta's user avatar
1 vote

Connect two networks over a VPN connection linux

There are no specific iptables rules for connecting networks. Iptables doesn't do routing – it does filtering, whereas your routing table does routing – so the only iptables rules you may need are ...
u1686_grawity's user avatar
0 votes

Manage VLANs on Linux Bridge and KVM host

Avoiding the additional bridges is possible when utilizing MacVTap: Switch - tagged port -> Linux physical interfaces -> Linux bond interface -> Linux VLAN interfaces -> Linux MacVTap ...
gecko's user avatar
  • 1
5 votes

Allow ssh-rsa with OpenSSH 8.7

ssh-rsa is not a key-exchange algorithm. The two lines in your error message are not related to each other – they report two different cases of unsupported algorithm in different categories. Diffie-...
u1686_grawity's user avatar
0 votes

DH GEX group out of range

This is a problem with the chosen key exchange method. You need to manually set a compatible one. Disabling all key exchange methods on the client will show what the server offers: ssh -o ...
copycat's user avatar
  • 71
1 vote

Linux e1000e (Intel networking driver) problems galore, where do I start?

I had the same problem while trying to create my specialized Kernel 6.10.6 configuration for my ThinkCentre M70q. The problem was related to setting CONFIG_PCIE_ASPM_PERFORMANCE instead of ...
Victor Queiroz's user avatar
0 votes

Symbolic link of all files in a folder to an existing folder

Linking folder A to a subdirectory in an existing folder B seems the most logical. ln -s A B/sub If you do need to link files to an existing folder, you can link them one at a time. However, this ...
Andrei's user avatar
  • 1
0 votes

Why doesn't my one-to-many ip6gre tunnel work?

This is due to a bug in Linux. In ip6gre_tunnel_xmit one of the first checks called is ip6_tnl_xmit_ctl to validate the source and destination address. However, it only validates the source and ...
user20574's user avatar
  • 179
0 votes

How to set permission so that `du` can be run as some user on external drive directories that are owned by multiple other users?

However, I think the issue would remain when new users (in other containers/VMs) create new files - they would again need to be chmod Define ACLs using setfacl. You can add multiple users or groups ...
u1686_grawity's user avatar
0 votes

How to get x86_energy_perf_policy // linux-tools-* for Linux kernel 4.7.0-xyz

In recent releases x86_energy_perf_policy is provided by linux-cpupower package: apt install linux-cpupower See man page.
Tombart's user avatar
  • 2,303
0 votes

"docker: 'compose' is not a docker command." How to use the alias "docker compose"?

Try with: sudo apt install docker-compose-v2 Tested in Ubuntu 22.04.
Pablo Speciale's user avatar
0 votes

nsupdate answering SERVFAIL

I had the same issue but my zones file was somewhere else sudo chown -R bind:bind /var/lib/bind
Martin Luther ETOUMAN's user avatar
0 votes

How to install company proxy certificate

For me downloading the relevant certificates worked nicely with host=www.apache.org; \ echo "" | openssl s_client -showcerts -connect ${host}:443 | \ awk '/-----BEGIN CERTIFICATE-----/ { i++;...
recursion's user avatar
1 vote

What is inside /var/lib/nginx/body, it's size is more than 40GBs for me and it keeps on increasing

On Debian (and presumably other Debian-derived distributions such as Ubuntu), this directory corresponds to the --http-client-body-temp-path= build configure option, which is hardcoded in the Debian ...
Etienne Dechamps's user avatar
0 votes

tar - Remove leading directory components on extraction

When extracting one item from the archive, --strip-components=NUMBER option can be used. However when extracting more than one item, --transform is helpful. E.g. tar xf archpackage.tar --transform=&...
balki's user avatar
  • 133
0 votes

In RHEL how does one set a default global DNS server using systemd NetworkManager instead of on a per nmcli connection basis?

Did you check the Red Hat Enterprise Linux documentation? It has an entire chapter covering this. Chapter 21. Manually configuring the /etc/resolv.conf file By default, NetworkManager dynamically ...
Esa Jokinen's user avatar
0 votes

Nginx displaying failed (13: Permission denied) when trying to access new site

This is not common to all but this can be the one scenario I also faced such issue with Harden Ubuntu 22.04 VM where the umask was set to 077 i.e for group and others don't have any permission. And ...
satish londhe's user avatar
0 votes

Slow performance copying large file over network (scp)

I think that to speed up transfer using your 802.11g wireless connection, you shoud multithread the transfer of the 300Gb file. Since 2023 and need for different scientists research groups to ...
nbanba's user avatar
  • 11
0 votes

Linux - Formating multiple-pattern-select with grep

You can use Perl to remove the newlines from every odd line: ... | perl -pe 'chomp if $. % 2' -p process the input line by line and prints each line after processing; chomp removes the final newline (...
choroba's user avatar
  • 391
0 votes
Accepted

SSSD failing to start

We were able to solve the SSSD connection errror. These are the steps that we did to solve it. In /etc/sssd/sssd.conf , change enumerate from false to true. enumerate = True Remove the files mentioned ...
JuliousGonsalves's user avatar
0 votes

How to add a timestamp to bash script log?

It worked for me #!/bin/sh DATETIME=`date "+%Y-%m-%d %H:%M:%S"` echo "[$DATETIME] TYPE_YOUR_MESSAGE" >> output_file.log Output Log File: output_file.log [2024-08-22 14:13:...
Chandan Sharma's user avatar
0 votes
Accepted

Ubuntu Samba share for Windows and Mac

After sitting down recently to finally figure this issue out, it turned out the solution was unfortunately, quite simply, to just update the Samba client. I guess something changed in Samba 4.8 ...
Joe Smith's user avatar

Top 50 recent answers are included