rejetto forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - LeoNeeson

Pages: 1 2 3 4 ... 56
16
HFS ~ HTTP File Server / Re: blocking ip-addresses by country
« on: October 16, 2023, 09:52:46 AM »
Thanks Leo
I configured both options, monitored them for several days, and the attacks became much smaller, but unfortunately peerblock greatly affects performance
I guess you are running HFS on a VPS, where resources are shared and limited (I do understand). Have you tried using HFS's banning option ONLY, without PeerBlock? (instead of running both options). Perhaps you don't need PeerBlock, if you add (in HFS) the IP ranges that attack your website.

You can configure this, by going to HFS's Menu > Limits > Bans... (it will open a window where you have to enter the IP ranges). Remember to check 'Disconnect with no reply'. Before doing this, please take a look HERE to know how to configure an IP range to be excluded (remember to put a backslash \ before the IP range)..
Try using this ONLY (without PeerBlock).

17
HFS ~ HTTP File Server / Re: blocking ip-addresses by country
« on: October 06, 2023, 09:16:46 AM »
PeerBlock is only supported up to Windows 7
I have windows server 2019
Have you tried PeerBlock on Windows Server 2019? (I've read reports that it works fine on Windows 10, so it should work). There is no better solution than PeerBlock for Windows.

I have another question: can I block an IP range in HFS?
and yes, if I block ranges, will requests still reach hfs?
Yes, as far I know, requests will still reach HFS (it don't prevent people from trying, and it could affect performance, the same as filtering by 'UserAgent', but you have to try it and see what happens). My previous comment could lead to confusion, so to make it clear: HFS v3 doesn't have 'IP filtering feature' (like Rejetto said), and HFS v2 doesn't have an option to block IP addresses by country, but it has 'IP Banning' and you can configure some 'IP ranges' to block (of course, expert users can also use a macro script to filter by IP range, but it's not needed, since it works the same as using the HFS's GUI).

You can configure this, by going to HFS's Menu > Limits > Bans... (it will open a window where you have to enter the IP ranges). Remember to check 'Disconnect with no reply'. Before doing this, please take a look HERE to know how to configure an IP range to be excluded (remember to put a backslash \ before the IP range). Please report back if that affects performance (compared to filtering by 'UserAgent').

18
HFS ~ HTTP File Server / Re: blocking ip-addresses by country
« on: October 04, 2023, 06:45:25 AM »
As Rejetto said, this is not implemented internally on HFS (for those who are expert on coding, something basic could be done using HFS's Macros, but it could make HFS slow, since we need to filter a lot of IP ranges for blocking an entirely country).

In your particular case, you have to use an external software. The most effective and easy to use solution, is using PeerBlock. Once you have installed PeerBlock, you have to use one list listed here (selecting the country you want to block). But keep in mind that PeerBlock works blocking connection system-wide (and you can't select only one software to block). So, it will block ALL connections you configure, for ALL the programs running on your Windows system (not only HFS). If you need to connect to some of the IPs you have blocked, you would need to temporary disable PeerBlock, or use another solution. As far I know, this is the only most easy solution.

» IMPORTANT: if you are targeted with DDoS attacks by someone expert, you could end blocking up almost the whole world (it could be like a witch-hunt), since the attacker could try to access your server from ANY other country using a VPN (or a proxy). Most of the time blocking an entirely country works, but sometimes it doesn't (and you will end blocking legitimate -good- users), so this is only an extreme measure. It's best NOT blocking an entirely country, but starting blocking ONLY the IP ranges of your attacker.

I hope it helps (please report back if that helped). :)
Cheers,
Leo.-

19
HFS ~ HTTP File Server / Re: HFS Only one User Agent can Download
« on: September 19, 2023, 07:52:33 PM »
Welcome! :)

It's easy, just press "Alt+F6" inside HFS. That will create and open a text file (hfs.events). There add the following:

Quote
[request]
{.if|{.{.header|User-Agent.}!=ALLOWED_USER_AGENT_NAME.}|{:{.disconnect.}:}.}

Replace the text marked in red (ALLOWED_USER_AGENT_NAME), by the user agent you want to allow access, for example, if you only want to allow "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0", you would use this:

Code: [Select]
[request]
{.if|{.{.header|User-Agent.}!=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0.}|{:{.disconnect.}:}.}

Replace the text marked in green (request), by "download", if you want to allow file listing (to anyone), but block downloads that doesn't match the specified user agent.

Cheers,
Leo.-

20
HFS ~ HTTP File Server / Re: Embedding video from HFS to website
« on: August 01, 2023, 10:46:25 PM »
Hi! :) I will try to help you.

The possible reason of this, could be a 'Mixed Content Error', because WordPress is hosted (using) an HTTPS (Secure, port 443) connection, and your videos (hosted using HFS) are using an HTTP (Insecure, port 80) connection. Most browsers automatically block access to non-secure resources when they are loaded from a secure website (that's why you need to configure your WordPress). You will find a tutorial (Step by Step), on 'How to Fix the Mixed Content Error in WordPress' visiting this link HERE.

Please report back if that solves your issue (or if the problem continues).

If the problem continues, you will find more clues about this, opening your Browser's console, pressing: Ctrl+Shift+J (before the page loads, to get all the info), and the tab about Network activity. You can share your console (and those screens), here, to see if I can find the origin of your issue (take the screenshot AFTER the page was loaded completely).

Working with WordPress could be tricky, the best option would be using a hosting without HTTPS.

Cheers,
Leo.-

21
Bug reports / Re: A question about HFS v2.3m vulnerability
« on: July 26, 2023, 01:58:38 AM »
If I read it correctly, this is a DoS solution that can't deal real damage, such as remote code execution?
That's right, this is only a DoS issue, that could have a performance impact (it does NOT have a 'remote code execution' vulnerability). This was fixed in v2.4.0 RC1, so if you want to avoid this issue, you can use that version (or any other later version, like v2.4 RC07). HFS v3.0 is a new software, that has been totally rewritten from the ground up (it has nothing to do with the old code of HFS v2.x).

Which HFS version is more secure (2.3m / 2.4 / 3.0)? Logically, not the beta versions, but they may have some vulnernabilities patched, I guess.
About 'which HFS version is more secure', in terms of security, it is always best to stick with the latest available version (this applies to any other software too). But the decision is always up to the end user.

22
yes both are on the same pc and host os but i have found that using the lan ip works better than 127 even for local stuff but sadly no matter the proxy pass url it wont work
:-[ To tell the truth, I'm not an Nginx expert, so it's hard to tell you what the exact problem is (and why it doesn't work for you). Rejetto has released a Nginx package HERE (to have HTTPS support). You can try his package, or you can 'extract' the correct setting from it. I haven't tested it, but perhaps using it you could solve your issue. Unfortunately I have no other solution in mind. :-\

23
Hi, :)

If you are running Nginx on the same PC that runs HFS (along with it, on the same OS), then instead of using:

Code: [Select]
proxy_pass http://192.168.0.100:80;
Use the following:

Code: [Select]
proxy_pass http://127.0.0.1:80;
Check if this solves your problem (and then please report back the results here).

btw what does "Return to this topic" do?
If you check this when posting a new thread/post, instead of going back to the message index, you return to the topic (and see your new post).

Cheers,
Leo.-

24
Beta / Re: version 2.4
« on: June 17, 2023, 10:48:33 PM »
A few days ago, I've received a private message from "TEA-Time", and he said that my code posted previously here, takes effect even on links to folders too (it's true, I misinterpreted his original request). What he wants is just to open in a new tab/window, only the "URL type" of links (those you get by right-clicking on "Root » New link"). Having this in mind, please follow the very same given instructions, but then on step 5, paste the following text:

Code: [Select]
[+]
<script>
$("img").each(function () {
    if($(this).attr("src").indexOf('~img_link') > -1) {
         $(this).parent().attr('target', '_blank');
    }
});
</script>

This is only valid for the default template of HFS (has been successfully tested with v2.4.0 RC6, RC7 and even with older v2.3m).

I hope that is useful... :)
Cheers,
Leo.-

25
Issues with HFS 2.4.0:

- when setting login and password, I can not access the files because of 'user not found' error (both login and password are correct)
- creating the user with access, no any login popup in Opera and Chrome (previous version worked fine)
Popup appearing in Mozilla only

Hi! :)

Friendly reminder: to make a proper (useful) report, we need the following...

1) Your exact version number (and build) of Chrome, Opera and Mozilla.
2) Your exact build of HFS v2.4.0 (there are many builds, latest is RC7).
3) Post a screenshot of the Browser's console (see instructions below)

How to open browser console:
> Launch the console using this universal shortcut: Ctrl + Shift + J
> Make a screenshot of the browser console, and post it here on the forum.

It's recommended to open the console -before- opening the URL. To do this, open a new blank tab, open the console, and load the URL of your HFS's server. Saying this, it's not guaranteed you get a solution (since HFS v2 development was discontinued, in favor of the new HFS3), but every issue/bug report is still appreciated, and perhaps we can help you.

Important detail: keep in mind that HFS v2.4.x have removed the 'traditional' login popup and replaced it with a modern login form (so, it's strange you still get it using Mozilla). Please add all the details listed above, to make this thread useful.

Cheers,
Leo.-

26
Bug reports / Re: Bug: Logout function at server level [Fixed]
« on: April 24, 2023, 10:36:26 AM »
Leo, hello!
There is a problem: If you log in locally, then the authorization form works fine, but if you access HFS from outside, via the Internet, the authorization form does not work, it does not respond to login / password. Please help me figure it out.
Hi! and welcome... :)

Sorry for my late reply (I've received your private message)

Your message doesn't say what version are you using, but please make sure you use latest v2.4 (or the new HFS3). The default template of HFS v2.x depends on jQuery to work, and some older templates (based on versions older than HFS v2.3f), were using an external CDN for jQuery. Since you say it works fine locally, perhaps 'something' is blocking or interfering with the access to jQuery (and therefore, affecting the login). Sadly, I could not give you more ideas than that. I currently don't have time to deal with complex issues, but if you add much more details, perhaps we could possibly have more idea of what is causing your issue (but I cannot promise to solve it).

For as much as I would like to help people, please consider this thread closed, since it was a technical discussion to implement the logout system, which was already added on HFS 2.4. Your issue is about the login, not logout anyway (in that case, is much better open a new thread, along with more details).

Cheers,
Leo.-

27
router & port problems / Re: problem when enabled two adapters
« on: April 15, 2023, 05:48:25 AM »
DMZ doesn't magically open ports for 2 network adapters, only one. DMZ should pass (open) all traffic for only ONE IP address (let say 172.16.20.203), and that should be configured on your router (check there what IP you assigned as DMZ). Then I assume 172.16.20.205 is the IP from your second adapter. HFS perhaps is 'switching' to your second adapter (and that's why it fails on being reachable from the outside). You need to choose (select) in HFS the IP assigned as DMZ (in your case, I guess is 172.16.20.203). If that fails, then your last option is making a 'bridge' between your 2 network adapters on Windows. You can follow THIS steps to make the bridge, but I can't guarantee it will work (you have to test it). Versions of "HFS SSL by SilentPliz" were based on the development of HFS 2.3x (which was discontinued), that's why if some bug arises, we all depend on the community collaboration to make fixes. That said, try making a 'bridge' between your 2 network adapters and please comment here if it worked or not. :)

28
HFS ~ HTTP File Server / Re: Adjusting column width in version 2.3m
« on: April 07, 2023, 03:28:56 AM »
I want to adjust the width of the column called "Name .extension". Need it to be a little wider so that the file name, if long, does not show up as two lines, rather just one line. Where do I edit the HTML to do that, if possible? Thanks.
Hi!, :) just follow these steps...

1) Press F6 to edit the template

2) Find the following line:

Code: [Select]
#files tr td:first-child { text-align:left; }
3) Change it with the following:

Quote
#files tr td:first-child { text-align:left; overflow:hidden; word-wrap:normal; white-space:nowrap; text-overflow:ellipsis; max-width:300px; }

(The text marked in red color is the addition)

This is just an example, it's up to you adapting to your needs (you need to have some CSS knowledge). The above code, is ONLY valid for the default template of v2.3m!

Hope it helps!
Cheers,
Leo.

29
HFS ~ HTTP File Server / Re: Documents view in browser
« on: April 05, 2023, 12:22:15 PM »
Looking in the sources of this extension, I've found it includes 2 types of MIME for XLS.

Try to use the following MIME (when doing these steps), for the XLS:

*.xls
application/msexcel

Change "application/vnd.ms-excel" to "application/msexcel"
If that doesn't work, then I had no idea on how to solve this, sorry... :-\

30
HFS ~ HTTP File Server / Re: Documents view in browser
« on: April 05, 2023, 10:18:46 AM »
Yes, almost all documents now open in the browser.   :D  Only XLS keeps downloading
I'm glad you almost got everything working. :D

Give me some time, to try to solve the XLS problem...

Pages: 1 2 3 4 ... 56