No introduce, no advanced usage, also no tutor for how to install, just config to implement proxy.
The case there is so easy so you can get sense of achivement quickly.
If I type
ssh firstname.lastname@example.org -p80 at vps1(127.0.0.1), it’ll connect to vps2(22.214.171.124:22)!
- vps1’s port 80 is open
- vps2’s port 22 is open
- haproxy was installed in vps1(127.0.0.1)
Then, run the command below to verify the syntex is right.
haproxy -f /etc/haproxy/haproxy.cfg -c
No error occur, yeap, run it!
haproxy -f /etc/haproxy/haproxy.cfg
Now, you can run
ssh -p33 email@example.com or
ssh -p80 firstname.lastname@example.org to connect to vps2(126.96.36.199) on ssh:22.
This is core config:
also, you can just use one part of it!
listen style: All access to port 80 data will go to 22!
All access to port 33 data will go to 22!
haproxy process look up:
ps -ef | grep haproxy .