Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors #4

Open
cgkh opened this issue Nov 1, 2017 · 5 comments
Open

Errors #4

cgkh opened this issue Nov 1, 2017 · 5 comments

Comments

@cgkh
Copy link

cgkh commented Nov 1, 2017

Hi Sami,

Tks for all the hard work.

Just installed your script on a Debian 9 VPS.

Logged in as root

Ran -

root@xxxx:/home/nShield# python nshield-main.py

and I am getting the following error

"Setting up Basic DDoS Protection
sysctl: permission denied on key 'net.netfilter.nf_conntrack_tcp_loose'
sh: 1: cannot create /sys/module/nf_conntrack/parameters/hashsize: Directory nonexistent"

Any idea what I'm doing wrong?

Thanks

@fnzv
Copy link
Owner

fnzv commented Nov 1, 2017

Hello @cgkh,
Try running these commands manually on the shell:
/sbin/sysctl -w net/netfilter/nf_conntrack_tcp_loose=0

echo 1000000 > /sys/module/nf_conntrack/parameters/hashsize && /sbin/sysctl -w net/netfilter/nf_conntrack_max=2000000 && /sbin/sysctl -w net.ipv4.tcp_syn_retries=2 && /sbin/sysctl -w net.ipv4.tcp_rfc1337=1 && /sbin/sysctl -w net.ipv4.tcp_synack_retries=1

If it gives the same error try again with 'sudo' in front of the command and tell me what happens.
Seems a permission issue, i have tested it on a clean Debian 9 server image and i couldn't replicate the error.

@cgkh
Copy link
Author

cgkh commented Nov 2, 2017

Sami,

Thanks so much for the quick response and advice.

I ran the scripts as requested as root and got the errors as shown in the attached text file and screenshot
error_1.txt
...

screenshot_2017-11-02_08-34-38

If you have any more ideas, I'd be very grateful.

Many Thanks

Chris

@fnzv
Copy link
Owner

fnzv commented Nov 3, 2017

Hello @cgkh ,
I tested it many times on a clean Debian 9 (Debian GNU/Linux 9 stretch - Kernel 4.9.0-4-amd64) and i cannot replicate the issue with the system commands.
If you want you can comment out the os.popen running these commands

@alessiosavi
Copy link

Is there a possibility that the VPS hosting service use some product like XenServer that disable the possibility to use that commands ?

@fnzv
Copy link
Owner

fnzv commented Nov 20, 2017 via email

@fnzv fnzv added the bug label Dec 30, 2017
@fnzv fnzv added the solved label Feb 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants