Author Archives: dmitriano

How to add a scrollable text block to a WordPress post

With preformatted block

Add the following class to your style.css:

.scrollable-log {
  overflow-y: scroll;
  font-family: Monaco, "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
  font-weight: normal !important;
  font-style: normal !important;
  font-size: 1em !important;
  max-height: 400px;
}
(more…)

Investigating Asterisk logs

Client C successfully call client A, but a call in the reverse direction fails. Client B successfully calls client A. See my previous post for my Asterisk configuration and clients.

IP addresses

IP address of client C is 176.15.165.103 and external IP address of client A is 91.122.37.167. Server IP address is 172.236.29.157.

172.28.33.149 is the local IP address of client A in Windows Sandbox (which external IP address is 91.122.37.167):

C:\Users\WDAGUtilityAccount>ipconfig

Windows IP Configuration


Ethernet adapter Ethernet:

   Connection-specific DNS Suffix  . : mshome.net
   Link-local IPv6 Address . . . . . : fe80::db7a:bb9e:748a:f5a9%205
   IPv4 Address. . . . . . . . . . . : 172.28.33.149
   Subnet Mask . . . . . . . . . . . : 255.255.240.0
   Default Gateway . . . . . . . . . : 172.28.32.1
(more…)

Further experimentations with PJSIP

I have two clients in Sandboxes on Windows 10 machines in a local network behind a router. First client is Linphone (client A) and second client is ZoiPer (client B), so the clients A and B are behind NAT. Also I have Linphone (client C), ZipPer (client D) and PortSIP (client F) on my Android mobile phone connected to the internet over 4G (so there is no NAT). The server is in the Docker container with default network configuration with all the ports mapped to the host.

My Asterisk configuration:

rtp.conf:

[general]
rtpstart=10000
rtpend=10099
(more…)

Interesting GASP chart

At about 8:50 PM MSK GAZP price reached its upper limit:

(more…)

Connecting two phones to Asterisk with PJSIP

I was able to connect to Asterisk running in a Docker container using Linphone app:

(more…)

Updating website icon in Joomla 5

For the Cassiopeia template, Joomla will look for the favicons in the following locations:

  1. media/templates/site/cassiopeia/images – they are not there so Joomla will look in the next location.
  2. media/system/images – they are there so Joomla will use them from there.
wget -O - https://sharlines.com | grep -i favicon
        <link href="/media/system/images/joomla-favicon.svg" rel="icon" type="image/svg+xml">
        <link href="/media/templates/site/cassiopeia/images/favicon.ico" rel="alternate icon" type="image/vnd.microsoft.icon">
        <link href="/media/system/images/joomla-favicon-pinned.svg" rel="mask-icon" color="#000">
(more…)

Running Asterisk 22 in a Docker container

I build and run Asterisk 22 in a Docker container on my Ubuntu 24.04 and it started to use 100% CPU and within a few hours consumed 100% of the disk space:

(more…)

Denying access to /xmlrpc.php on a WordPress website

Today I notices that my WordPress website consumes 30% CPU.

(more…)

Preventing OpenVPN clients from seeing each other

Listing existing rules

sudo docker exec -it dockovpn_dockovpn_1 bash
iptables --list
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     udp  --  anywhere             anywhere             state NEW,ESTABLISHED udp dpt:openvpn
ACCEPT     all  --  anywhere             anywhere

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  10.8.0.0/24          anywhere
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     udp  --  anywhere             anywhere             state ESTABLISHED udp spt:openvpn
ACCEPT     all  --  anywhere             anywhere
(more…)

Running VPN Server with Access Server in a Docker container

Run the docker container:

sudo docker pull openvpn/openvpn-as
sudo ufw allow 1194/udp
sudo ufw allow 943/tcp
sudo ufw allow 1443/tcp

sudo docker run -d --rm \
  --name=openvpn-as --device /dev/net/tun \
  --cap-add=MKNOD --cap-add=NET_ADMIN \
  -p 943:943 -p 1443:443 -p 1194:1194/udp \
  -v /var/lib/openvpn-as:/openvpn \
  openvpn/openvpn-as

sudo docker logs -f openvpn-as | grep "generated pass"
Auto-generated pass = "*********". Setting in db...
(more…)