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 - ItzBlakeBro

Pages: [1]
CSF Firewall / Re: /bin/bash^M: bad interpreter and iptables
« on: April 04, 2019, 06:41:47 PM »
That worked! Thank you very much!

CSF Firewall / Re: /bin/bash^M: bad interpreter and iptables
« on: April 02, 2019, 10:09:45 PM »
I do not know what commands you are putting there, or what their purpose is, but to disable all IP connections, first I would change the default sshd server port to any other unused port, then I would remove the default access permission from that port of the file '/etc/csf/csf.conf', the TCP_IN directive, and TCP6_IN.
And only then, if it was a fixed IP address, would it put the IP address permission on '/etc/csf/csf.allow'.
If it were a dynamic address, it would just portknocking on that port.
This solution would not suit you .. ??


All I am trying to do is get CSF to execute two iptable commands on startup by default, rather than me having to manually insert them. I do have, an accept config for my IP on both ports.

iptables -A INPUT -p tcp --destination-port 2222 -j DROP
iptables -A INPUT -p tcp --destination-port 3306 -j DROP

^M is a DOS ‘Carriadge Return/Line Feed’ control symbol. Possibly, you are edit UNIX shell script using Windows editor (or copy-paste it from Windows), so ^M was appended to each string in script.

Use CentOS appropriate text editor to fix it. If you not familar with ‘vi’ or ‘nano’ editors, you can install ‘mc’ - Midnight Commander, which looks like as Norton Commander for DOS using shell command

yum install mc

then navigate to your script, open it for edit and you will see ^M at the end of strings. Remove it completely

I am using VIM to edit the files, and I tried to edit them through CSF itself, that is when I started getting this error. Right now, the two files and are empty except for the two top lines of

Code: [Select]
# Run external commands after csf configures iptables
# Run external commands before csf configures iptables

Running /usr/local/csf/bin/
sh: /usr/local/csf/bin/ /bin/bash^M: bad interpreter: No such file or directory

CentOS 7 Problems / Re: Netdata
« on: April 02, 2019, 09:48:58 PM »
Yes CentOS 7, thank you!

CentOS 7 Problems / Netdata
« on: March 30, 2019, 09:05:22 AM »
How can I disable / remove netdata?


CSF Firewall / /bin/bash^M: bad interpreter and iptables
« on: March 30, 2019, 09:01:27 AM »

I was trying to add some custom iptables commands to basically drop all connects from my SSH port + MySQL etc, other than my IP but I keep getting this when starting CSF

root@[~]: sh: /usr/local/csf/bin/ /bin/bash^M: bad interpreter: No such file or directory

I tried changing the shebang in to #!/usr/bin/bash but that returned the same.

At this time is default with what ships with CWP7, so basically empty. What can I do to have these rules applied after / before startup of CSF?

CentOS 6 Problems / Re: Admin Panel 404 Error
« on: March 14, 2019, 04:48:19 PM »
I finally got a chance to do a full server reboot this morning and this seemed to fix it, give it a shot if you haven't already.

CentOS 6 Problems / Admin Panel 404 Error
« on: March 14, 2019, 07:03:38 AM »

Anytime I try to login to the admin panel I get redirected to a 404 not found with the above being the link. This randomly started happening, I have not logged in for a few days and upon trying to login I get this. As well the user control panel seems to be different and I can not login to ANY user accounts. I've tried everything I can think of including the following (in this order) and still can't get in.

Clear browser cache

  470  service cwpsrv restart
  471  sh /scripts/cwpsrv_rebuild_user_conf
  472  sh /scripts/restart_cwpsrv
  473  sh /scripts/restart_httpd
  474  sh /scripts/generate_hostname_ssl
  475  yum update
  476  yum reinstall cwpsrv cwpphp

  477  service cwpsrv restart
  478  sh /scripts/cwpsrv_rebuild_user_conf
  479  sh /scripts/restart_cwpsrv
  480  sh /scripts/generate_hostname_ssl

yum update returned nothing all of the commands came back without any errors, after a reinstall I tried to login with the same so I ran the commands again. At this point I seem stuck out of CWP. Any ideas?  :'(

CentOS-WebPanel Bugs / Re: CWP to CWP Migration Errors
« on: March 06, 2019, 06:49:36 PM »
Thanks for your reply.

I missed the step of clicking "Add Public Key to Authorized"

I was not ever able to get it working with a password, but once I got the public key and click Add Public Key to Authorized it was successfully able to connnect.

CentOS-WebPanel Bugs / Re: CWP to CWP Migration Errors
« on: March 05, 2019, 08:09:46 PM »
I've tried everything in this post and still am receving
Successful operation
The following error occurred (false )

Are there any other tips? This is a really frusturating error.

Information has been triple checked, Firewalls disabled on both servers, port is correct, same OS version, same CWP version. Tried creating a blank "/etc/hostname" tried changing the password to something without special characters, tried a wildcard API key, literally everything.

If I switch to a publich SSH key metod I return the same errors as others above.

Pages: [1]