Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Welcome to World of IPTV
Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?
Sounds daft, but it's easy to forget the basics when focused on something new so I'll ask, did you remember to update you MAIN servers firewall rules to allow connections from the reverse proxy server IP address?
You also need to make sure your MAIN config has the port open for receiving http messages from nginx so if your http broadcast port was 8000 or 8080 for example, you will want to include that, but you will also want to include port 80 in the main config as that is the port nginx will use for http protocol.
Edit: Ignore above, I can see from above you have included port 80 in your config.
I think Cloudflare is getting hammered right now, I have been using for months on the paid service, Has being fine up until now, I have it all running on LB's but now we just get constant freezing . Turn CF off and works perfectly,
WARNING !!!!!! This tutorial does NOT protect your IP's.
The second your Main Server issues the 302 redirect to the LB its game over and your LB's IP is exposed.
This DOES protect your Main Server IP though so it's a good start.... kind of
What happens when the APK asks player_api and panel_api for their details? the Main Server is exposed again. Your NGINX is no doing any kind of rewriting on in-line content which is a HUGE give away to finding the real details. Just put wireshark on this setup and you will see how useless it is.
You also dont have to touch the nginx.conf file on your Main Server - its not needed at all.
WARNING !!!!!! This tutorial does NOT protect your IP's.
The second your Main Server issues the 302 redirect to the LB its game over and your LB's IP is exposed.
This DOES protect your Main Server IP though so it's a good start.... kind of
What happens when the APK asks player_api and panel_api for their details? the Main Server is exposed again. Your NGINX is no doing any kind of rewriting on in-line content which is a HUGE give away to finding the real details. Just put wireshark on this setup and you will see how useless it is.
You also dont have to touch the nginx.conf file on your Main Server - its not needed at all.
Thanks, I had just tested connectivity after updating the APK with the reverse proxy DNS address, but will test this with Wireshark and make some changes to fix the leaks, thanks for the heads up.
did someone try to use this nginx reverse proxy config with openvpn Server nginx proxy as openvpn server & Xtream ui main as Client and work change real ip with local private openvpn ip ?
Or someone can tell us if it possible or not ?
ps : for Delta1372 "the Main Server is exposed again " i used wireshark with http nginx reverse proxy config i never saw that wireshark can't get ip of main xtream ui server just proxy ip and in main XUI server in config i put domain name of reverse proxy and real ip of reverse proxy not main server real ip it work fine and hide main ip but i don't test with lb until now , i think it's logic that lb will be exposed but main server no .
Managed to find a way to hide the LB IP's when scanning network with Wireshark and playing streams.
I had to set up an additional reverse proxy server for each LB and within the nginx.conf set proxy_pass to the LB DNS. Save the config and reload it and then within the Xtream UI Admin panel go to Manage Servers and then enter the IP address of the reverse proxy in VPN field.
I then started a capture using Wireshark with apk running in Bluestacks and it only captured the IP of the reverse proxy for that load balancer when playing streams from it.
Not a bad approach actually. What happens when you have a panel that does not support the VPN IP field? - You are almost there but there is a way to do it so its 100% panel independant The reason being, the traffic still hits the IPTV server in one way or another with your method.
Also, what happens when you have a 10gbit LB or a 20 or a 100 gbit LB
Having a customer facing 10gbit or more server is a bad idea as the traffic spikes way to much during match day and thats easy for the FriendMTS agents / ISP's to spot which means they can see your service.
You also need to look at what other information XC based systems leak out like get.php and player_api.php etc.
Also, what happens when you have a 10gbit LB or a 20 or a 100 gbit LB
Having a customer facing 10gbit or more server is a bad idea as the traffic spikes way to much during match day and thats easy for the FriendMTS agents / ISP's to spot which means they can see your service.
You also need to look at what other information XC based systems leak out like get.php and player_api.php etc.
I'm currently saving up credits for another panel as I wasted the last of them on a couple of duff resources so can only test on Xtream UI for now, but have heard that it's leaks from XC core that is enabling FriendMTS agents to identify services to block so that's definitely high on my priorities to switch over panels.
For traffic spikes I'd assume using a CDN is the only workaround for that if your client base is scattered across lots of locations?
I'm currently saving up credits for another panel as I wasted the last of them on a couple of duff resources so can only test on Xtream UI for now, but have heard that it's leaks from XC core that is enabling FriendMTS agents to identify services to block so that's definitely high on my priorities to switch over panels.
For traffic spikes I'd assume using a CDN is the only workaround for that if your client base is scattered across lots of locations?
Managed to find a way to hide the LB IP's when scanning network with Wireshark and playing streams.
I had to set up an additional reverse proxy server for each LB and within the nginx.conf set proxy_pass to the LB DNS. Save the config and reload it and then within the Xtream UI Admin panel go to Manage Servers and then enter the IP address of the reverse proxy in VPN field.
I then started a capture using Wireshark with apk running in Bluestacks and it only captured the IP of the reverse proxy for that load balancer when playing streams from it.
I was able to get ride of client_area, thank you for this. Can you advice what do you mean by getting ride of MAGS and /c ? Isn't /wwwdir/c super used on panel?
I've seen this subject come up a lot recently so hopefully this can help someone out.
I have been playing around trying to get an nginx reverse proxy server setup and after some initial frustrations I have got there in the end.
The idea is to setup a server that sits in front of your main server and load balance servers. Clients will contact the reverse proxy server which in turn communicates with your main and then passes the response back to the client so that your main server IP or DNS is not exposed to the client, only the reverse proxy server is.
See the below data flow diagram with obfuscated / mocked up DNS addresses if still unclear.
Server 1: Xtream UI MAIN / Admin
Server 2: Xtream UI LB1 Server
Server 3: Xtream UI LB2 Server
Server 4: Nginx Reverse Proxy Server
I created a single user within the admin panel and added a handful of streams onto LB1 and a handful of VOD content onto LB2.
Finally I edited an APK file to point the DNS address within the APK file to the NGINX Reverse Proxy server and the HTTP broadcast port.
I won't include how to install and setup Xtream UI in this guide so will assume you already know how to do that and you now have your Xtream UI server and panel up and running and you are now ready to setup the reserve proxy.
So firstly we must SSH into the server that we are going to be using as the reverse proxy server and setup nginx.
Code:
apt-get update; apt-get install nginx;
Next we unlink the default enabled site for nginx that is setup following the installation.
Code:
unlink /etc/nginx/sites-enabled/default
Now we want to create our config file for the reserve proxy service we want to run:
Test if the config file is okay or if you have any errors run:
Code:
service nginx configtest
If the config file is okay then restart nginx
Code:
service nginx restart
To check on the status of the reverse proxy you can run:
Code:
systemctl status nginx
Next we want to update our existing nginx.conf file for Xtream UI on our Main server so we can close our SSH session on the Reverse Proxy server and SSH into our MAIN Server. We do not need to change much to the existing nginx config file for Xtream UI other than to add an entry so that we listen on port 80 for the nginx comms and that we want to set the real ip address from the proxy server.
Next you need to edit the APK file and ensure the DNS address uses the DNS/IP address of the reverse proxy server and the broadcast port. E.g. http://MYNGINXPROXYDNS.NET:8080
Recompile your apk and log in and you should now be to play streams from your panel that are routed from the nginx reverse proxy.
HTTPS UPDATE
Hi All,
The above config works where there are no SSL certs on the proxy or XUI servers. I had been having trouble getting this to work on servers with SSL certs, but have now managed to get this working also, In order to get this working with SSL do the following:
1) Buy any old domain (e.g. bagofvegtables.net) from somewhere like noip and then assign your proxy servers IP address to the domain and update the A records and Nameservers.
2) Install SSL cert onto proxy server with
3) Provide E-mail and agree to terms and allow letsencrypt to install certs.
Next on your proxy server run
Code:
sudo apt-get install nginx
Once nginx is installed run
Code:
sudo nano /etc/nginx/nginx.conf
Then enter the below as your config file contents (changing the domain name from the bagofvegtables.net one I just made up to the one you actually installed the cert for and changing the example ports listed for whatever ones you're XUI is currently configured to use and also replacing the dns to your main server from the example one entered below).
Then test if the config file is okay or if you have any errors run:
Code:
service nginx configtest
If the config file is okay then restart nginx
Code:
service nginx restart
Next you need to go to your MAIN server and update your firewall to allow connections from your proxy server IP address to your MAIN server and edit your nginx.conf to set_real_ip_from then add the ip address of your proxy server.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.