Skip to content

Instantly share code, notes, and snippets.

@ashkanRmk
Last active April 9, 2023 18:56
Show Gist options
  • Select an option

  • Save ashkanRmk/da15f93233860e294d270addda2705d4 to your computer and use it in GitHub Desktop.

Select an option

Save ashkanRmk/da15f93233860e294d270addda2705d4 to your computer and use it in GitHub Desktop.
**EU Server scripts**
apt-get update -y && apt-get upgrade -y
apt install curl -y
bash <(curl -Ls https://raw.githubusercontent.com/vaxilu/x-ui/master/install.sh)
--------------------------------------------------------------
**Iran Server scripts**
# replace IRAN_IP and EU_IP
apt-get update -y && apt-get upgrade -y
sysctl net.ipv4.ip_forward=1
iptables -t nat -A PREROUTING -p tcp --dport 22 -j DNAT --to-destination IRAN_IP
iptables -t nat -A PREROUTING -j DNAT --to-destination EU_IP
iptables -t nat -A POSTROUTING -j MASQUERADE
--------------------------------------------------------------
**Finally open below link for admin panel**
# replace EU_IP
EU_IP:54321
@ashkanRmk
Copy link
Author

hi dear ashkan, thank you for this effective metod... it's working excellent... just i change the admin's login info of webbased user manager and i forget username and password, please guid me for recover my login informations

YW,
Best way to recover login information is to completely remove x-ui and install it again.

@arcan5331
Copy link

arcan5331 commented Nov 26, 2022

hey i did all the work and it worked just fine for about 2 or 3 days but after that i cant connect the config with IR server.
it's working without port forwarding (connecting directly to EU server) but can't connect to config throw IR server.
i can ping both servers but the IR server almost cant ping the EU server (60 - 80 % PL) (EU server also has the same problem with IR server)

@ashkanRmk
Copy link
Author

hey i did all the work and it worked just fine for about 2 or 3 days but after that i cant connect the config with IR server. it's working without port forwarding (connecting directly to EU server) but can't connect to config throw IR server. i can ping both servers but the IR server almost cant ping the EU server (60 - 80 % PL) (EU server also has the same problem with IR server)

It seems your hosting provider limits your server internet to just the IRAN intranet.
some of them set this limitation for their customer. I suggest you change your IR server provider, this may solve your problem.

@sjwar
Copy link

sjwar commented Nov 30, 2022

Hello, thank you for this help, I wanted to know how long the internet speed has been disrupted v2ray It has come too low, you have no way out for this problem

@ashkanRmk
Copy link
Author

Hello, thank you for this help, I wanted to know how long the internet speed has been disrupted v2ray It has come too low, you have no way out for this problem

you have to change and test different combinations of protocol and transmission types based on your internet provider and region to get the best result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment