Welcome to World of IPTV

With

+23k members
+11k threads
+106k posts

we are the most popular IPTV community on the web. 

IMPORTANT NOTE:
WE HAVE RECENTLY NOTICED THAT TOO MANY DOUBLE FAKE ACCOUNTS ARE CREATED IN THE PAST.
TO PREVENT THIS ISSUE THE DECISION WAS MADE THAT IN THE FUTURE A ANNUALLY FEE 20 EURO WILL BE RAISED FOR NEW MEMBERSHIPS.

Join now to the World of IPTV

Forum Rules

Before you start, check out the forum rules first

Account upgrade

Upgrade your account to get access to full features

Advertising

Would you like to place your advertisement with us ?

Resources Manager

Hundreds of IPTV scripts and apps are available for download

Tutorial XtreamUi protection with File2ban

mister no

Extended Member
Ext. Member
Joined
Oct 1, 2019
Messages
41
Reaction score
660
Points
94
Location
CH
First create a conf file /etc/fail2ban/filter.d/xtream.conf or whatever you want to call the configuration,


then in jail.local create a conf file with data on the duration of ban ip etc.


bantime = -1 permanent ban

Remember in /home/xtreamcodes/iptv_xtream_codes/nginx/conf/nginx.conf you must grant access.log

Tested on ubuntu 16 04 and works great !!!

 
Last edited:

noris

Extended Member
Ext. Member
Joined
Sep 21, 2019
Messages
132
Reaction score
366
Points
74
Location
Bulgaria
First create a conf file /etc/fail2ban/filter.d/xtream.conf or whatever you want to call the configuration,
No quote

then in jail.local create a conf file with data on the duration of ban ip etc.
No quote

bantime = -1 permanent ban

Remember in /home/xtreamcodes/iptv_xtream_codes/nginx/conf/nginx.conf you must grant access.log

Tested on ubuntu 16 04 and works great !!!

Can you post also your log_format in nginx.conf?
 
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changglobize
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com

hasan

Extended Member
Ext. Member
Joined
Sep 19, 2019
Messages
5
Reaction score
15
Points
14
Location
austria
Can you post also your log_format in nginx.conf?
ubuntu 18
acces.log

ip - - [19/Apr/2021:12:32:33 +0000] "GET /portal.php?action=handshake&type=stb&token=&mac= HTTP/1.1" 200 51 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ip Safari/537.36"

error.log

2021/04/18 21:07:51 [error] 4073#4073: *260 limiting requests, excess: 8.200 by zone "one", client: ip, server: , request: "GET /portal.php?token=&type=stb&action=handshake HTTP/1.1", host: "ip:8000"
 

noris

Extended Member
Ext. Member
Joined
Sep 21, 2019
Messages
132
Reaction score
366
Points
74
Location
Bulgaria
That not working, need right format for failregex
 

mister no

Extended Member
Ext. Member
Joined
Oct 1, 2019
Messages
41
Reaction score
660
Points
94
Location
CH
Can you post also your log_format in nginx.conf?
I pointed out that it works in ubuntu 16 04 and for 18 I don't know I haven't tested it .




I think you have an overview here, here is the situation from yesterday, how many new IPs are blocked :)

GET /portal.php?action=handshake&type=stb&token=&mac=
GET \/portal\.php\?type=stb&action=(?:handshake&token=&prehash=0&JsHttpRequest=1\-xml|get_profile

in regex there is no mac option with me
 
Last edited:
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changglobize
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com

noris

Extended Member
Ext. Member
Joined
Sep 21, 2019
Messages
132
Reaction score
366
Points
74
Location
Bulgaria
On ubuntu 18.04 must added datepattern = \[(%%d/%%b/%%Y:%%H:%%M:%%S %%z)\] to work because will get error "Please try setting a custom date pattern (see man page jail.conf(5))"...
but still need more effective failregex =
 

mister no

Extended Member
Ext. Member
Joined
Oct 1, 2019
Messages
41
Reaction score
660
Points
94
Location
CH
On ubuntu 18.04 must added datepattern = \[(%%d/%%b/%%Y:%%H:%%M:%%S %%z)\] to work because will get error "Please try setting a custom date pattern (see man page jail.conf(5))"...
but still need more effective failregex =
It has nothing to do with a better effect with blocked ip but only shows the time and date when which ip is blocked !
 

mister no

Extended Member
Ext. Member
Joined
Oct 1, 2019
Messages
41
Reaction score
660
Points
94
Location
CH
^<HOST> .* /.* 4\d\d .*$


Add this option to regex in a new row below the existing regex and all ip with error 404 will be blocked
 
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changglobize
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com

noris

Extended Member
Ext. Member
Joined
Sep 21, 2019
Messages
132
Reaction score
366
Points
74
Location
Bulgaria
Friend with that will ban not only 404, will ban all 4**.
Customers get error 406 when not have some channel in their bouquet, with that will ban all if delete some channel.

may be:
failregex = ^<HOST> .* 404 .*
 

hasan

Extended Member
Ext. Member
Joined
Sep 19, 2019
Messages
5
Reaction score
15
Points
14
Location
austria
xtream.conf:
# Fail2Ban filter for xtream
#
[INCLUDES]

before = xtream.conf

[Definition]


failregex = ^<HOST> -.* "GET \/portal\.php\?type=stb&action=(?:handshake&token=&prehash=0&JsHttpRequest=1\-xml|get_profile) HTTP\/1\.1" 200 .*
           

ignoreregex =

jail.local:
[xtream]
enabled = true
filter = xtream
action = iptables-allports[xtream, port="http,https", protocol=tcp]
logpath = /home/xtreamcodes/iptv_xtream_codes/logs/main.log
bantime = 60m
maxretry = 5

ubuntu 18 ok
thank you

test later
 

ddmmyy

Extended Member
Ext. Member
Joined
Sep 19, 2019
Messages
98
Reaction score
287
Points
64
Location
Universe
xtream.conf:
# Fail2Ban filter for xtream
#
[INCLUDES]

before = xtream.conf

[Definition]


failregex = ^<HOST> -.* "GET \/portal\.php\?type=stb&action=(?:handshake&token=&prehash=0&JsHttpRequest=1\-xml|get_profile) HTTP\/1\.1" 200 .*
          

ignoreregex =

jail.local:
[xtream]
enabled = true
filter = xtream
action = iptables-allports[xtream, port="http,https", protocol=tcp]
logpath = /home/xtreamcodes/iptv_xtream_codes/logs/main.log
bantime = 60m
maxretry = 5

ubuntu 18 ok
thank you

test later
Is this working Right ? on Ubuntu 18.04 ? Thank you.
 
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changglobize
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com

akawi11

Extended Member
Ext. Member
Joined
Sep 20, 2019
Messages
290
Reaction score
578
Points
104
Location
Europe
Friend with that will ban not only 404, will ban all 4**.
Customers get error 406 when not have some channel in their bouquet, with that will ban all if delete some channel.

may be:
failregex = ^<HOST> .* 404 .*
also 404 not recommended because some devices have wired requests GET /images/c877d859.....5083d5.jpg HTTP/1.1" 404
it's possible because of the apps that they use
 

noris

Extended Member
Ext. Member
Joined
Sep 21, 2019
Messages
132
Reaction score
366
Points
74
Location
Bulgaria
on main server:

failregex = ^<HOST> - .* 404 0 .*

on proxy servers:

failregex = ^<HOST> - .* 404 5 .*
 

noris

Extended Member
Ext. Member
Joined
Sep 21, 2019
Messages
132
Reaction score
366
Points
74
Location
Bulgaria
I made some experiments:

[xtream]

enabled = true
action = iptables-allports[protocol=all, blocktype=DROP]
filter = xtream
logpath = /home/xtreamcodes/iptv_xtream_codes/logs/main.access.log
maxretry = 2
bantime = 3600
ignoreip = 127.0.0.1,add your ip

in crontab add:

0 */1 * * * echo "" > /home/xtreamcodes/iptv_xtream_codes/logs/main.access.log


Still try to made best config for error 404, if someone can help, will be great.
 
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changglobize
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com

mister no

Extended Member
Ext. Member
Joined
Oct 1, 2019
Messages
41
Reaction score
660
Points
94
Location
CH
I made some experiments:



in crontab add:




Still try to made best config for error 404, if someone can help, will be great.
Try this
^<HOST>.*"(GET|POST).*" (404|444|403|400) .*$

ignoreip = 127.0.0.1 add your ip
(space only , without , )

ignoreip = search and edit in jail.conf I did so and it works

results in 3 days
 

zorro

Extended Member
Ext. Member
Joined
Sep 26, 2019
Messages
23
Reaction score
85
Points
24
Location
Suisse
hi,

1 - can anyone give the final conf ?
2- how can test to make sure it works?

thanks all for your work
 

ernestt

Extended Member
Ext. Member
Joined
Sep 19, 2019
Messages
99
Reaction score
307
Points
64
Location
USA
I made some experiments:



in crontab add:




Still try to made best config for error 404, if someone can help, will be great.
i tried many conf from forum but simply didnt get to work, probably i missing something any sugestion would be helpful Thanks.
 
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changglobize
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com

terminatortv

Basic Member
Basic Member
Joined
Jan 11, 2021
Messages
52
Reaction score
207
Points
44
Location
Croatia
Try this
^<HOST>.*"(GET|POST).*" (404|444|403|400) .*$

ignoreip = 127.0.0.1 add your ip
(space only , without , )

ignoreip = search and edit in jail.conf I did so and it works

results in 3 days
I made some experiments:



in crontab add:




Still try to made best config for error 404, if someone can help, will be great.


Hi, can you please help me with config? I tried your config but my http://portal:ip/portal.php?type=stb&action=get_profile is still accessible.

Thank you alot!
 

terminatortv

Basic Member
Basic Member
Joined
Jan 11, 2021
Messages
52
Reaction score
207
Points
44
Location
Croatia
Try this
^<HOST>.*"(GET|POST).*" (404|444|403|400) .*$

ignoreip = 127.0.0.1 add your ip
(space only , without , )

ignoreip = search and edit in jail.conf I did so and it works

results in 3 days

How can I add your failregex to existing one:
failregex = ^<HOST> -.* "GET \/portal\.php\?type=stb&action=(?:handshake&token=&prehash=0&JsHttpRequest=1\-xml|get_profile) HTTP\/1\.1" 200 .*
 
shape1
shape2
shape3
shape4
shape5
shape6
Top
AdBlock Detected

We know, ad-blocking software do a great job at blocking ads. But our site is sponsored by advertising. 

For the best possible site experience please take a moment to disable your AdBlocker.
You can create a Account with us or if you already have account, you can prefer an Account Upgrade.

I've Disabled AdBlock