3x-ui
Warning
This guide is deprecated and needs to be updated.
Setup used
The setup was used in my case:
- OS: Ubuntu 22.04.5
- 3x-ui Version: 2.4.6
- VPS: Aéza
Installation
As soon as we log into the system after purchasing a VPS, we execute the following commands:
- to install all updates
- where .pem is the public key, and .key is the private key. Just keep pressing Enter, no need to fill anything in.
- to install the panel itself
Setting up
-
Would you like to customize the Panel Port settings? (If not, a random port will be applied)
we answer "n". -
Click on the link in the "Access URL" line to access our panel. Enter the credentials generated for us after the installation.
3.Go to Panel Settings, then to the Authentication section, and change the login details. In the General section, specify the path to the already created Public & Private keys: /etc/ssl/certs/3x-ui.pem and /etc/ssl/certs/3x-ui.key. Scroll up, click Save, and restart the panel.
Inbound creation
- Protocol:
vless
- Port:
443
- Client:
Enabled
- Email =
email
orusername
- Security:
Reality
- uTLS:
chrome/firefox
- Dest и SNI: choose a website with the lowest ping in the country where your VPS is located. You can check it by running the following command in your VPS terminal: ping domain.com. You can ask your VPS support for assistance or simply ask ChatGPT.
If port 443 is occupied, then:
- Port: custom or default
- uTLS: chrome/firefox/random You are supposed to test it yourself because it works differently on each VPS, ISP, and even OS.
- Dest and SNI: you also need to test these yourself.
Click on the QR code icon next to the created client, then click the QR code to copy it to the clipboard, and paste it into Nekoray/Streisand.
Securing and little tweaks
Fail2ban
After runnig touch /etc/fail2ban/jail.local && nano /etc/fail2ban/jail.local
Copy and paste (ctrl + shift + v):
[sshd]
enabled = true
filter = sshd
action = iptables[name=SSH, port=ssh, protocol=tcp]
logpath = /var/log/auth.log
findtime = 600
maxretry = 3
bantime = 43200
Press ctrl + x, then y, and hit enter to save and exit.
Ufw
-
Look
-A ufw-before-input -p icmp --icmp-type echo-request -j ACCEPT
and changeACCEPT
toDROP
- Open the ports you need (SSH, 3x-ui, 443, and any others if you have additional services). ctrl + x, y and enter.
-
In the terminal, type
-
Type 20 (IP Limit Management) and press Enter. Then press 1 to install and type y.
BBR
-
In the terminal, type
-
Type 23 (Enable BBR) and select 1 (Enable BBR).
Final
Finally, clean up, reboot, and you're ready to use it.