Skip to content

Commit

Permalink
tweak: node-dusk
Browse files Browse the repository at this point in the history
  • Loading branch information
BoboTiG committed Jan 6, 2025
1 parent 13169d7 commit 431f177
Show file tree
Hide file tree
Showing 2 changed files with 129 additions and 3 deletions.
8 changes: 6 additions & 2 deletions sources/blockchain/node-dusk.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ Installer et configurer le pare-feu pour autoriser **seulement** les connexions
:language: shell
```

### Serveur NTP

```{include} _node-ntp.md
```

### 📍 Dusk

Télécharger et exécuter le script d’installation automatique pour Dusk :
Expand All @@ -126,7 +131,7 @@ Ces commandes seront pratiques de déterminer l’état du nœud :

```{literalinclude} snippets/node-dusk.sh
:caption: ☁️ Serveur (VPS) ✍️
:lines: 78-
:lines: 200-
:language: shell
```

Expand Down Expand Up @@ -375,7 +380,6 @@ To Action From
2025-01-01
: Changement d’hébergeur pour cause de mauvaises performances (Contabo → Vultr).
: Ajout de la section [Récompenses](recompenses).
: Suppression de la section traitant du serveur NTP (obsolète depuis le passage à Vultr).
2024-12-30
: Amélioration de l’alias `chosen` ([0907b14](https://github.com/BoboTiG/luma/commit/0907b1467c25a6e88ede070f3de3bef324d5ddec) → [53f84d7](https://github.com/BoboTiG/luma/commit/53f84d74bbfc1f6313ec58914f5af497cea9cb1f)).
Expand Down
124 changes: 123 additions & 1 deletion sources/blockchain/snippets/node-dusk.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

cat << EOF >> ~/.ssh/config
cat << 'EOF' >> ~/.ssh/config
Host dusk
User root
HostName ADRESSE_IP
Expand Down Expand Up @@ -75,6 +75,128 @@ echo 'Y' | ruskreset \

source ~/.profile

apt install btop \
&& apt purge \
apache2-utils \
apport \
appstream \
apt-utils \
bash-completion \
binutils \
bolt \
bpfcc-tools \
bpftrace \
btrfs-progs \
byobu \
cloud-guest-utils \
cmake \
cracklib-runtime \
dbus \
dosfstools \
eject \
git \
javascript-common \
keyboxd \
krb5-locales \
man-db \
manpages-dev \
mawk \
motd-news-config \
nftables \
parted \
patch \
pinentry-curses \
python3-botocore \
python3-click \
python3-dev \
python3-gi \
python3-idna \
python3-jwt \
python3-markdown-it \
python3-pip \
python3-pyinotify \
python3-pyrsistent:amd64 \
python3-serial \
python3-twisted \
sosreport \
strace \
sudo \
systemd-timesyncd \
tmux \
ubuntu-pro-client \
ubuntu-release-upgrader-core \
ubuntu-standard \
vim-common \
wamerican \
x11proto-dev \
xauth \
zstd \
&& apt autoremove \
&& sed -i 's/typeset -g POWERLEVEL9K_VCS_BACKENDS=(git)/typeset -g POWERLEVEL9K_VCS_BACKENDS=()/' ~/.p10k.zsh \
&& dpkg -l | grep -Ec '^ii' # 457

cat << 'EOF' > /etc/sysctl.conf
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.tcp_fin_timeout = 10
net.ipv4.tcp_keepalive_time = 1800
net.ipv4.tcp_keepalive_intvl = 15
net.ipv4.tcp_keepalive_probes = 5
net.ipv4.tcp_max_syn_backlog = 4096
net.ipv4.tcp_synack_retries = 1
net.ipv4.tcp_syncookies = 0
net.ipv4.tcp_congestion_control = htcp
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.lo.rp_filter = 1
# TODO: adapt ethernet device below
net.ipv4.conf.enp1s0.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.lo.accept_source_route = 0
# TODO: adapt ethernet device below
net.ipv4.conf.enp1s0.accept_source_route = 0
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.ip_local_port_range = 1024 65535
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_rfc1337 = 1
net.ipv4.ip_forward = 0
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.icmp_echo_ignore_all = 1
net.ipv4.icmp_ignore_bogus_error_responses = 1
net.core.somaxconn = 65535
net.core.netdev_max_backlog = 1000
net.core.rmem_default = 65536
net.core.wmem_default = 65536
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_mem = 50576 64768 98152
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
net.ipv4.tcp_low_latency = 1
EOF




















cat << 'EOF' >> ~/.profile
# Dusk
Expand Down

0 comments on commit 431f177

Please sign in to comment.