Configurar DNS no Plesk Linux

Instalei ontem o Plesk Obsidian num servidor Linux Ubuntu 18.04 porém não consigo configurar o DNS. Não entendi muito bem como isso deve ser feito na configuração inicial e não acho nenhum vídeo ensinando o Administrador do sistema a configurar isso, só de gente que já tem domínio de como alterar o DNS pra usar a hospedagem. Também não achei nada aqui no Stack, podem me dar uma mãozinha?

networking – Corruption using linux traffic control (tc command)

I am kinda new to doing traffic control using Linux tc commands. So i am doing some hands-on on introducing network delay, packet loss and corruption etc across two hosts in the same network. The below commands were used to corrupt all traffic from port 20786 in Host A to port 202 in Host machine B.

sudo tc qdisc add dev eth0 root handle 1: prio priomap 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
sudo tc qdisc add dev eth0 parent 1:2 handle 20: netem corrupt 30%
sudo tc filter add dev eth0 parent 1:0 protocol ip u32 match ip sport 20786 0xffff flowid 1:2
sudo tc filter add dev eth0 parent 1:0 protocol ip u32 match ip dport 202 0xffff flowid 1:2

How do i make sure the packets will be corrupted? I am asking this because won’t there be TCP error control which make sure that the packets don’t get corrupted?

linux – nethogs -t | awk ‘{print $0}’ return no output

nethogs is a linux process bandwidth monitoring tool. https://github.com/raboof/nethogs

nethogs -t

it’s output looks like this.

Refreshing:
sshd: root@pts/0/4002/0 0.185156        0.0773437
unknown TCP/0/0 0       0

Refreshing:
sshd: root@pts/0/4002/0 0.220703        0.0902344
unknown TCP/0/0 0       0

Refreshing:
sshd: root@pts/0/4002/0 0.217578        0.0902344
unknown TCP/0/0 0       0

I’m trying to to parse it’s outout with awk.

nethogs -t | awk {'print $0}' 

returns no output 🙁

nethogs -t | awk {'readline tmp; print tmp}' 

much the same ;

I presume it’s the way nethogs is buffering it’s output or some other quirky way it’s writing it’s output.

nethogs -t | awk -W interactive '{print $2}'

i get some output, but it’s not working as expected.

I’ve tried playing with awk’s RS and FS settings, but no luck.

arch linux – Xorg hangs at startx with xfce4 and dwn

Today after waking up and booting my computer I have noticed that it hangs at boot, I don’t remember fiddling with any settings nor updating the system or installing any software as I was working with a website project all evening where things worked ok

I tried removing everything from. xinitrc no effect

I tried creating new user account and startx from that account

I have tried reinstalling nvidia, nvidia-utils

tried resetting xorg.conf

no matter what I try it just hangs right at the beginning.

I cannot switch to different tty as soon as it freezes nor can I restart the pc with ctrl+alt+del

I shows the xorg message ending Using system config dir and hangs at that point. No error message just silent freeze

I use dwm but installing xfce for example did not resolve the issue either.

if I press power button it shuts down.
What else can I check appart from complete reinstall?

linux – Recreate functionality of “wget –convert-links” but for files that are already downloaded

“wget –convert-links” is amazing however I am in a scenario of trying to work with files that were downloaded WITHOUT –convert-links, and the server they were downloaded from no longer exists so wget isn’t usable.

The HTML files currently contain links like <a href="/dir1/dir2/1.jpg">

Because I’m browsing the files locally, and not using a web server, links starting with / are non-viable, they must be relative to the directory that the HTML is actually in, for example:

  1. If the HTML file is in dir1/dir2/dir3/ then the link needs to convert to “../1.jpg”

  2. If the HTML file is in dir1/dir2/dir3/dir4/ then the link needs to convert to “../../1.jpg”

  3. If the HTML file is in dir1/dir5/dir6/ then the link needs to convert to “../../dir2/1.jpg”

  4. If the HTML file is in dir1/dir5/dir6/dir7/dir8/ then the link needs to convert ../../../../dir2/1.jpg”

I am using Windows 10 but running Ubuntu via WSL so I have standard Linux tools available.

I considered converting all the links to an absolute path from the root of my WSL filesystem (such as converting them to “/mnt/d/temp/test/dir1/dir2/1.jpg”) however then I wouldn’t be able to move the files later without re-converting everything, also, I need to be able to distribute these files to other people and have them remain functional for them as well.

I attempted using this script: https://www.perlmonks.org/?displaytype=displaycode;node_id=56338

However, it appears to only be able to convert links starting with href="http, not href="/

I was unable to find any similar scripts or tools that could do the job.

I did find that at one point, wget was going to be updated with a “–convert-specified-links” option to allow conversion of already-downloaded files (without requiring any connection to a server), however, it appears that this was never actually implemented.

Installation OpenLiteSpeed Web Server on Amazon Linux (RHEL)

I’m just trying to install OLS on my Amazon Linux 2 instance, but i received errors at first and all last steps. Here is the explaination about:

  1. When i added recommended by guide repository, i receive error:

     failure: repodata/repomd.xml from litespeed: (Errno 256) No more mirrors to try.
    

    http://rpms.litespeedtech.com/centos/8/x86_64/repodata/x86_64/repodata/repomd.xml: (Errno 14) HTTP Error 404 – Not Found

To fix it, i just replace $releaseserver to 8 (as i can see at http://rpms.litespeedtech.com/centos/) at link http://rpms.litespeedtech.com/centos/$releasever/$basearch/
and… it works!
But after that, when i trying to install, i receive these dependency errors:

Loaded plugins: langpacks, priorities, update-motd
191 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package lsphp73.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: lsphp73-common(x86-64) = 7.3.18-1.el8 for package: lsphp73-7.3.18-1.el8.x86_64
--> Processing Dependency: libssl.so.1.1(OPENSSL_1_1_0)(64bit) for package: lsphp73-7.3.18-1.el8.x86_64
--> Processing Dependency: libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) for package: lsphp73-7.3.18-1.el8.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.27)(64bit) for package: lsphp73-7.3.18-1.el8.x86_64
--> Processing Dependency: libssl.so.1.1()(64bit) for package: lsphp73-7.3.18-1.el8.x86_64
--> Processing Dependency: libcrypto.so.1.1()(64bit) for package: lsphp73-7.3.18-1.el8.x86_64
--> Processing Dependency: libargon2.so.1()(64bit) for package: lsphp73-7.3.18-1.el8.x86_64
---> Package openlitespeed.x86_64 0:1.6.14-1.el8 will be installed
--> Processing Dependency: lsphp73-xml for package: openlitespeed-1.6.14-1.el8.x86_64
--> Processing Dependency: lsphp73-process for package: openlitespeed-1.6.14-1.el8.x86_64
--> Processing Dependency: lsphp73-pdo for package: openlitespeed-1.6.14-1.el8.x86_64
--> Processing Dependency: lsphp73-opcache for package: openlitespeed-1.6.14-1.el8.x86_64
--> Processing Dependency: lsphp73-mysqlnd for package: openlitespeed-1.6.14-1.el8.x86_64
--> Processing Dependency: lsphp73-mcrypt for package: openlitespeed-1.6.14-1.el8.x86_64
--> Processing Dependency: lsphp73-mbstring for package: openlitespeed-1.6.14-1.el8.x86_64
--> Processing Dependency: lsphp73-imap for package: openlitespeed-1.6.14-1.el8.x86_64
--> Processing Dependency: lsphp73-gd for package: openlitespeed-1.6.14-1.el8.x86_64
--> Processing Dependency: libnsl for package: openlitespeed-1.6.14-1.el8.x86_64
--> Running transaction check
---> Package lsphp73.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.27)(64bit) for package: lsphp73-7.3.18-1.el8.x86_64
--> Processing Dependency: libargon2.so.1()(64bit) for package: lsphp73-7.3.18-1.el8.x86_64
---> Package lsphp73-common.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.27)(64bit) for package: lsphp73-common-7.3.18-1.el8.x86_64
---> Package lsphp73-gd.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libpng16.so.16(PNG16_0)(64bit) for package: lsphp73-gd-7.3.18-1.el8.x86_64
--> Processing Dependency: libwebp.so.7()(64bit) for package: lsphp73-gd-7.3.18-1.el8.x86_64
--> Processing Dependency: libpng16.so.16()(64bit) for package: lsphp73-gd-7.3.18-1.el8.x86_64
--> Processing Dependency: libXpm.so.4()(64bit) for package: lsphp73-gd-7.3.18-1.el8.x86_64
--> Processing Dependency: libX11.so.6()(64bit) for package: lsphp73-gd-7.3.18-1.el8.x86_64
---> Package lsphp73-imap.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libc-client.so.2007()(64bit) for package: lsphp73-imap-7.3.18-1.el8.x86_64
---> Package lsphp73-mbstring.x86_64 0:7.3.18-1.el8 will be installed
---> Package lsphp73-mysqlnd.x86_64 0:7.3.18-1.el8 will be installed
---> Package lsphp73-opcache.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.27)(64bit) for package: lsphp73-opcache-7.3.18-1.el8.x86_64
---> Package lsphp73-pdo.x86_64 0:7.3.18-1.el8 will be installed
---> Package lsphp73-pecl-mcrypt.x86_64 0:1.0.3-1.el8.7.3 will be installed
--> Processing Dependency: libmcrypt.so.4()(64bit) for package: lsphp73-pecl-mcrypt-1.0.3-1.el8.7.3.x86_64
---> Package lsphp73-process.x86_64 0:7.3.18-1.el8 will be installed
---> Package lsphp73-xml.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.24)(64bit) for package: lsphp73-xml-7.3.18-1.el8.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.22)(64bit) for package: lsphp73-xml-7.3.18-1.el8.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.18)(64bit) for package: lsphp73-xml-7.3.18-1.el8.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.13)(64bit) for package: lsphp73-xml-7.3.18-1.el8.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.11)(64bit) for package: lsphp73-xml-7.3.18-1.el8.x86_64
--> Processing Dependency: libxslt.so.1()(64bit) for package: lsphp73-xml-7.3.18-1.el8.x86_64
--> Processing Dependency: libexslt.so.0()(64bit) for package: lsphp73-xml-7.3.18-1.el8.x86_64
---> Package openlitespeed.x86_64 0:1.6.14-1.el8 will be installed
--> Processing Dependency: libnsl for package: openlitespeed-1.6.14-1.el8.x86_64
---> Package openssl11-libs.x86_64 1:1.1.1c-3.amzn2.0.1 will be installed
--> Running transaction check
---> Package libX11.x86_64 0:1.6.7-2.amzn2 will be installed
--> Processing Dependency: libX11-common >= 1.6.7-2.amzn2 for package: libX11-1.6.7-2.amzn2.x86_64
--> Processing Dependency: libxcb.so.1()(64bit) for package: libX11-1.6.7-2.amzn2.x86_64
---> Package libXpm.x86_64 0:3.5.12-1.amzn2.0.2 will be installed
---> Package libc-client.x86_64 0:2007f-16.el7 will be installed
---> Package libmcrypt.x86_64 0:2.5.8-13.el7 will be installed
---> Package libxslt.x86_64 0:1.1.28-5.amzn2.0.2 will be installed
---> Package lsphp73.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.27)(64bit) for package: lsphp73-7.3.18-1.el8.x86_64
--> Processing Dependency: libargon2.so.1()(64bit) for package: lsphp73-7.3.18-1.el8.x86_64
---> Package lsphp73-common.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.27)(64bit) for package: lsphp73-common-7.3.18-1.el8.x86_64
---> Package lsphp73-gd.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libpng16.so.16(PNG16_0)(64bit) for package: lsphp73-gd-7.3.18-1.el8.x86_64
--> Processing Dependency: libwebp.so.7()(64bit) for package: lsphp73-gd-7.3.18-1.el8.x86_64
--> Processing Dependency: libpng16.so.16()(64bit) for package: lsphp73-gd-7.3.18-1.el8.x86_64
---> Package lsphp73-opcache.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.27)(64bit) for package: lsphp73-opcache-7.3.18-1.el8.x86_64
---> Package openlitespeed.x86_64 0:1.6.14-1.el8 will be installed
--> Processing Dependency: libnsl for package: openlitespeed-1.6.14-1.el8.x86_64
--> Running transaction check
---> Package libX11-common.noarch 0:1.6.7-2.amzn2 will be installed
---> Package libxcb.x86_64 0:1.12-1.amzn2.0.2 will be installed
--> Processing Dependency: libXau.so.6()(64bit) for package: libxcb-1.12-1.amzn2.0.2.x86_64
---> Package lsphp73.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.27)(64bit) for package: lsphp73-7.3.18-1.el8.x86_64
--> Processing Dependency: libargon2.so.1()(64bit) for package: lsphp73-7.3.18-1.el8.x86_64
---> Package lsphp73-common.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.27)(64bit) for package: lsphp73-common-7.3.18-1.el8.x86_64
---> Package lsphp73-gd.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libpng16.so.16(PNG16_0)(64bit) for package: lsphp73-gd-7.3.18-1.el8.x86_64
--> Processing Dependency: libwebp.so.7()(64bit) for package: lsphp73-gd-7.3.18-1.el8.x86_64
--> Processing Dependency: libpng16.so.16()(64bit) for package: lsphp73-gd-7.3.18-1.el8.x86_64
---> Package lsphp73-opcache.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.27)(64bit) for package: lsphp73-opcache-7.3.18-1.el8.x86_64
---> Package openlitespeed.x86_64 0:1.6.14-1.el8 will be installed
--> Processing Dependency: libnsl for package: openlitespeed-1.6.14-1.el8.x86_64
--> Running transaction check
---> Package libXau.x86_64 0:1.0.8-2.1.amzn2.0.2 will be installed
---> Package lsphp73.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.27)(64bit) for package: lsphp73-7.3.18-1.el8.x86_64
--> Processing Dependency: libargon2.so.1()(64bit) for package: lsphp73-7.3.18-1.el8.x86_64
---> Package lsphp73-common.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.27)(64bit) for package: lsphp73-common-7.3.18-1.el8.x86_64
---> Package lsphp73-gd.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libpng16.so.16(PNG16_0)(64bit) for package: lsphp73-gd-7.3.18-1.el8.x86_64
--> Processing Dependency: libwebp.so.7()(64bit) for package: lsphp73-gd-7.3.18-1.el8.x86_64
--> Processing Dependency: libpng16.so.16()(64bit) for package: lsphp73-gd-7.3.18-1.el8.x86_64
---> Package lsphp73-opcache.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.27)(64bit) for package: lsphp73-opcache-7.3.18-1.el8.x86_64
---> Package openlitespeed.x86_64 0:1.6.14-1.el8 will be installed
--> Processing Dependency: libnsl for package: openlitespeed-1.6.14-1.el8.x86_64
--> Finished Dependency Resolution
Error: Package: lsphp73-opcache-7.3.18-1.el8.x86_64 (litespeed)
           Requires: libc.so.6(GLIBC_2.27)(64bit)
Error: Package: lsphp73-7.3.18-1.el8.x86_64 (litespeed)
           Requires: libargon2.so.1()(64bit)
Error: Package: lsphp73-gd-7.3.18-1.el8.x86_64 (litespeed)
           Requires: libwebp.so.7()(64bit)
Error: Package: openlitespeed-1.6.14-1.el8.x86_64 (litespeed)
           Requires: libnsl
Error: Package: lsphp73-common-7.3.18-1.el8.x86_64 (litespeed)
           Requires: libc.so.6(GLIBC_2.27)(64bit)
Error: Package: lsphp73-gd-7.3.18-1.el8.x86_64 (litespeed)
           Requires: libpng16.so.16(PNG16_0)(64bit)
Error: Package: lsphp73-7.3.18-1.el8.x86_64 (litespeed)
           Requires: libc.so.6(GLIBC_2.27)(64bit)
Error: Package: lsphp73-gd-7.3.18-1.el8.x86_64 (litespeed)
           Requires: libpng16.so.16()(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

I have no idea how to fix it.
Thanks to your reply.

linux networking – Add IP addresses to systemd-network besides netplan

On an Ubuntu 20.04 server, netplan is used to configure the network. It can configure ordinary static IP addresses but I need additional IPv6 addresses with preferred_lft=0. Netplan can’t do that (there’s an open bug for that). So I found out that it actually goes like this:

  • Netplan reads its own limited config and transforms it into a config for the more powerful systemd-network.
  • systemd-network probably passes on its data to things like the ip command when a network device appears.
  • The network device then applies the actual configuration. Down here everything is possible.

If netplan can’t help me, I tried to move on to systemd. Since I don’t want to remove the apparently widely used and highly praised netplan entirely, I just need to add my additional addresses besides the basic netplan config.

I tried to create the file /etc/systemd/network/web-ipv6.conf with this content:

(Match)
Name=ens33 (this is the name from the existing netplan file)

(Address)
Address=fd9e:21a7:a92c:2323::2/64
PreferredLifetime=0

The address fd9e:21a7:a92c:2323::1 is configured statically via netplan. In this demo it’s a local address, in reality it’s my server’s main IPv6 address. Additional addresses have a different interface value, like this …::2.

I guess I have to apply my config with systemctl restart systemd-networkd but I’m not sure. The log says things I’d consider a success. But the new IPv6 address …::2 doesn’t show up in ip addr.

In the man page for systemd.network I’ve read that only a single file for a (Match) will be used. I clearly have two files now: one from netplan (/run/systemd/network/10-netplan-ens33.network) and my other one. So this doesn’t seem to work. But I don’t want to edit netplan’s file as it will surely be overwritten sometime.

How should I continue with this? I’d like to have a separate and persistent file that only adds my additional addresses. I’m going to manage that file in a custom script.

Should I go back to ifupdown or what it was in the old days? In a previous server setup I use a file named /etc/network/if-up.d/dynamic6 that contains all the ip addr add ... dev ... preferred_lft 0 commands. From what I’ve seen this is today considered deprecated.

boot – MSI Bravo 17 and Linux compatibility

After received my new laptop bought to code under linux Ubuntu, i discovered that this product based on AMD Ryzen 4800H (Navi 14 Mobile) VEGA 10 with Radeon RX 5500M is unable to work with ubuntu !

I am totally disappointed cause i bought it to work on linux but all my tries with the forllowing distributions failed :

  • ubuntu 20.04 desktop stucks on black screen after installation reboot.
  • Linux Mint works with nomodeset but a permanent banner indicating me missing graphic accelerator push me to try AMD Radeon software for Ubuntu 20.04 – since installation – i completely lost any shell command.

Only Windows works, Grrrrrrrrrrrrrr…

Please help if you have any ideas

networking – How do I configure my Linux eth interfaces correctly?

This subject drives me crazy. No matter what instructions I follow on the Internet. It only generates problems. I want to configure my eth0 interface for IPv4 and IPv6 for a static IP on Debian Buster.

nano /etc/network/interfaces

Whats inside:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address xxx.xxx.xxx.xxx     # my Public-IP IPv4
        netmask 255.255.252.0       # my Netmask
        broadcast xxx.xxx.xx.xxx    # my Broadcast
        gateway xxx.xxx.xxx.xxx     # my Internet Gateway
        dns-nameservers 0.0.0.0 9.9.9.9  # Using local DNS Resolver, Quad9 as Backup

iface eth0 inet6 static
        address 2a03:xxxx           # my Public-IP IPv4
        netmask 64                  # my Netmask
        gateway fe80::1             # my Internet Gateway
        dns-nameservers ::1 2620:fe::fe   # Using local DNS Resolver, Quad9 as Backup

Performing systemctl restart networking.services results in:

$ systemd[1]: Starting Raise network interfaces...
$ ifup[12031]: Waiting for DAD... Done
$ ifup[12031]: RTNETLINK answers: File exists
$ ifup[12031]: ifup: failed to bring up eth0
$ networking.service: Main process exited, code=exited, status=1/FAILURE
$ systemd[1]: networking.service: Failed with result 'exit-code'.
$ systemd[1]: Failed to start Raise network interfaces.

Any help is appreachiated.