Posted On March 29, 2019

HAProxy Example for SSH & OpenVNP forwarding

kimconnect 0 comments
blog.KimConnect.com >> Codes , Linux >> HAProxy Example for SSH & OpenVNP forwarding
# Source: https://limbenjamin.com/articles/running-https-ssh-vpn-on-port-443.html
 
global
tune.ssl.default-dh-param 2048
 
defaults
timeout connect 5000
timeout client 50000
timeout server 50000
 
frontend ssl
mode tcp
bind 0.0.0.0:443
tcp-request inspect-delay 5s
tcp-request content accept if HTTP
use_backend ssh if { payload(0,7) -m bin 5353482d322e30 }
use_backend main-ssl if { req.ssl_hello_type 1 }
default_backend openvpn
 
frontend main
bind 127.0.0.1:443 ssl crt /some/folder/cert.pem accept-proxy
mode http
option forwardfor
default_backend webserver
 
frontend http
bind 0.0.0.0:80
reqadd X-Forwarded-Proto:\ http
default_backend webserver
 
backend main-ssl
mode tcp
server main-ssl 127.0.0.1:443 send-proxy
 
backend openvpn
mode tcp
timeout server 2h
server openvpn-localhost 127.0.0.1:1193
 
backend ssh
mode tcp
timeout server 2h
server ssh-localhost 127.0.0.1:22
 
backend webserver
mode http
option forwardfor
redirect scheme https code 301 if !{ ssl_fc }
server webserver-localhost 127.0.0.1:81

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

PowerShell: Change IP of Remote Windows

# Change-IP-Remote-Windows.ps1$oldIP="192.168.40.135"$newIP="192.168.40.136"$netmask="255.255.255.0"$gateway="192.168.40.1"$dnsServers=@("10.10.8.1","10.10.18.1")function changeIpRemoteComputer{ Param ( [string]$oldIP, [string]$newIP, [string]$newSubnetMask = "255.255.255.0", [string]$newDefaultGateway, [array]$newDNS = @("8.8.8.8","4.4.2.2") )…

Windows 10: Update Script

8/7/2020: there's an updated version of this script here. function updateWindows{# Set PowerShell Gallery as…

JavaScript: Build a Tic Tac Toe Game (without AI)

Demo: https://blog.kimconnect.com/wp-content/projects/ticTacToeGame.html CSS Code: @import url('https://fonts.googleapis.com/css?family=Merienda');body{ font-family: 'Merienda', cursive; font-weight: bold;}#gameBoard { width: 396px; //…