network tips¶
use a different ip address on a curl
command¶
to use 127.0.0.1
instead the real ip address of docs.rda.run
download ssl certificate¶
echo quit | openssl s_client -showcerts -servername docs.rda.run -connect docs.rda.run:443 > site-cert.pem
to use this cert on curl
to use this cert on wget
verify network throughput between two servers¶
on server 01
on server 02
running iperf3
as a service¶
/etc/systemd/system/iperf3.service
[Unit]
Description=iperf3 server
After=syslog.target network.target
[Service]
ExecStart=/usr/bin/iperf3 -s
Restart=always
RuntimeMaxSec=3600
User=iperf
[Install]
WantedBy=multi-user.target
DefaultInstance=5201
sudo adduser --system --no-create-home -s /sbin/nologin iperf
sudo systemctl daemon-reload
sudo systemctl start iperf3
list all ipv4 address of a network¶
nmap -sn 172.17.3.0/24 | grep -B 1 'Host is up' | grep -oE '[[:digit:]]{1,}\.[[:digit:]]{1,}\.[[:digit:]]{1,}\.[[:digit:]]{1,}'
telnet with timeout¶
# echo quit | timeout --signal=9 3 telnet [HOST] [PORT]
$ echo quit | timeout --signal=9 3 telnet rda.run 6969
Trying 172.217.28.14...
Killed
using curl to calculate website load time¶
you can get some other infos too.
curl -o /dev/null -s -w {time_connect}:%{time_starttransfer}:%{time_total}\\n https://rda.run
# connection time : transfer start : total time in seconds
0,035299:0,151648:0,157692
port redirect on windows 10¶
use powershell as admin:
netsh interface portproxy add v4tov4 listenport=80 listenaddress=127.0.0.1 connectport=80 connectaddress=192.168.99.100
to test if the rule was applied:
to remove the rule: