Stunnel: mudanças entre as edições
Ir para navegação
Ir para pesquisar
(Criou página com '<syntaxhighlight lang=bash> #/ ___|_ _| | | | \ | | \ | | ____| | #\___ \ | | | | | | \| | \| | _| | | # ___) || | | |_| | |\ | |\ | |___| |___ #|____/ |_| \___/|_| \_...') |
Sem resumo de edição |
||
Linha 9: | Linha 9: | ||
cat << EOF > /etc/stunnel/commands | cat << EOF > /etc/stunnel/commands | ||
openssl genrsa -out key.pem 2048 | openssl genrsa -out key.pem 2048 | ||
openssl req -new -x509 -key key.pem -out cert.pem -days 3650 | openssl req -new -x509 -key key.pem -out cert.pem -days 3650 -subj "/C=FR/O=krkr/OU=Domain Control Validated/CN=*.krkr.io" | ||
cat key.pem cert.pem >> /etc/stunnel/stunnel.pem | cat key.pem cert.pem >> /etc/stunnel/stunnel.pem | ||
Edição das 12h39min de 25 de maio de 2022
#/ ___|_ _| | | | \ | | \ | | ____| |
#\___ \ | | | | | | \| | \| | _| | |
# ___) || | | |_| | |\ | |\ | |___| |___
#|____/ |_| \___/|_| \_|_| \_|_____|_____|
#
yum install -y stunnel
cat << EOF > /etc/stunnel/commands
openssl genrsa -out key.pem 2048
openssl req -new -x509 -key key.pem -out cert.pem -days 3650 -subj "/C=FR/O=krkr/OU=Domain Control Validated/CN=*.krkr.io"
cat key.pem cert.pem >> /etc/stunnel/stunnel.pem
EOF
cd /etc/stunnel ; sh /etc/stunnel/commands
cat << EOF > /etc/stunnel/stunnel.conf
; **************************************************************************
; * Global options *
; **************************************************************************
; Debugging stuff (may be useful for troubleshooting)
debug = info
output = stunnel.log
; foreground = yes
socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1
client = yes
cert = /etc/stunnel/stunnel.pem
sslVersion = TLSv1.2
options = NO_SSLv2
options = NO_SSLv3
; **************************************************************************
; * Service definitions (at least one service has to be defined) *
; **************************************************************************
[myapp]
accept = 127.0.0.1:12345
connect = remote.app.com:12345
EOF