Last active
July 25, 2023 22:23
-
-
Save paigeadelethompson/c4790f4414d736e2a33deb8a816e9e12 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ip -j addr | jq -r '.[] | select(.ifname | startswith("tun")) | .ifname +" "+ .addr_info[0].local' | awk '{print $2"%"$1}' | parallel -u -j8 iperf --bind {} -c 10.1.0.1 -p 443 -i | |
1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
/bin/ip route add 10.1.0.1 via $route_vpn_gateway dev $dev table $dev | |
/bin/ip rule add from $(/bin/ip -j addr show dev $dev | jq -r '.[] | .addr_info[0].local' | tr -d '\n') table $dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
/bin/echo "100 tun0" >> /etc/iproute2/rt_tables | |
/bin/echo "200 tun1" >> /etc/iproute2/rt_tables | |
/bin/echo "300 tun2" >> /etc/iproute2/rt_tables | |
/bin/echo "400 tun3" >> /etc/iproute2/rt_tables | |
/bin/echo "500 tun4" >> /etc/iproute2/rt_tables | |
/bin/echo "600 tun5" >> /etc/iproute2/rt_tables | |
/bin/echo "700 tun6" >> /etc/iproute2/rt_tables | |
/bin/echo "800 tun7" >> /etc/iproute2/rt_tables | |
/bin/echo "900 tun8" >> /etc/iproute2/rt_tables |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Notes | |
# https://community.openvpn.net/openvpn/wiki/Gigabit_Networks_Linux | |
# https://haydenjames.io/improving-openvpn-performance-and-throughput/ | |
# https://github.com/OpenVPN/ovpn-dco/issues/1 | |
# https://github.com/OpenVPN/ovpn-dco | |
client | |
connect-retry 5 | |
dev-type tun | |
proto udp | |
port 1194 | |
remote 192.168.1.104 1194 | |
cipher CHACHA20-POLY1305 | |
data-ciphers CHACHA20-POLY1305 | |
verb 3 | |
mute 20 | |
ca ca.crt | |
key cli.key | |
cert cli.crt | |
#dh dh.pem | |
tun-mtu 1500 | |
mssfix 1460 | |
sndbuf 512000 | |
rcvbuf 512000 | |
txqueuelen 2000 | |
route-noexec | |
up ./up.sh | |
route-up ./route-up.sh | |
comp-lzo no | |
fast-io |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Notes | |
# https://community.openvpn.net/openvpn/wiki/Gigabit_Networks_Linux | |
# https://haydenjames.io/improving-openvpn-performance-and-throughput/ | |
# https://github.com/OpenVPN/ovpn-dco/issues/1 | |
# https://github.com/OpenVPN/ovpn-dco | |
dev tun | |
proto udp | |
port 1194 | |
cipher CHACHA20-POLY1305 | |
data-ciphers CHACHA20-POLY1305 | |
verb 3 | |
mute 20 | |
server 10.1.0.0 255.255.255.0 | |
ca ca.crt | |
key ovpn.key | |
cert ovpn.crt | |
dh dh.pem | |
tun-mtu 1500 | |
mssfix 1460 | |
sndbuf 512000 | |
rcvbuf 512000 | |
txqueuelen 2000 | |
comp-lzo no | |
push "sndbuf 512000" | |
push "rcvbuf 512000" | |
fast-io | |
duplicate-cn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
seq 1 8 | sudo parallel -u -j8 openvpn --script-security 2 --dev tun{} --config openvpn.conf |
This was not a good test example, the server is running on a debian armel vm running on a macbook m1 parallels bridging wifi) from one laptop wifi to another
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
first multiclient load test, server is
iperf -s 0.0.0.0 -p 443
actual available bandwidth approx 480mbpsclient command is:
ip -j addr | jq -r '.[] | select(.ifname | startswith("tun")) | .ifname +" "+ .addr_info[0].local' | awk '{print $2"%"$1}' | parallel --tag -j8 iperf --bind {} -c 10.1.0.1 -p 443 > loadtest.log
iperf stats from the server perspective