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.


Topics - darkness

Pages: [1] 2
1
Information / High disk usage?
« on: November 28, 2017, 07:49:10 AM »
Code: [Select]
[root@server ~]# sh /scripts/disk_check
75M     /var/log/
61M     /usr/local/apache/logs/
94M     /usr/local/cwpsrv/logs/
2.1M    /tmp
41M     /root
467M    /var/lib/mysql/
[root@server ~]#
Code: [Select]
[root@server ~]# du -sh /
48G     /
[root@server ~]#
Code: [Select]
[root@server ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_server-lv_root
                       50G   43G  4.4G  91% /
tmpfs                  16G     0   16G   0% /dev/shm
/dev/cciss/c0d0p1     477M   77M  376M  17% /boot
/dev/mapper/vg_server-lv_home
                      296G  5.7G  275G   3% /home
[root@server ~]#
Any idea why it`s happening like this and how to fix it? Yes, I have a lot of files with big sizes in /home/hosting and /home/shopping but it`s supposed to be in /home, not in /. Any ideas accepted.

2
CentOS 6 Problems / Until when I have to wait and pay for nothing?
« on: November 11, 2017, 07:26:10 PM »
3 months ago I got angry on CWP Pro and I requested cancelation. 2 months ago I decided to use ModSecurity with Comodo WAF and needed to upgrade again to CWP Pro. I requested CWP Pro. 2 months already I`m paying for CWP Pro but I still don`t have CWP Pro. A month ago I received an answer that my issue is forwarded to payment department. No answer from nobody and 2 months I still pay for nothing. I`m not going to starve or to become a millionaire with $1 a month but I don`t think this is correct behaviour from the owners and devels.

3
Problems on other RedHat linux servers / CWP working on RHEL 7.4
« on: November 07, 2017, 07:30:44 PM »
Just wanted to say that CWP is working very good on Red Hat Enterprise Linux 7.4 (Maipo).

4
Other / Extra DNS
« on: November 02, 2017, 04:41:24 PM »
You don`t have your own DNS server or you don`t want to run BIND on your server? But you need DNS server? As I remember one post, CWP is planning to remove FreeDNS option. So I can offer you a free DNS service. If you need that service just PM me with username you want for the web panel (it`s the same like CWP`s FreeDNS, but I`ll keep username and password for login (the password will be random generated and send to you by PM)). The web panel can be accessed on https://dns.born2host.com and the DNS servers will be ns1.born2host.com(77.236.162.245) and ns5.born2host.com(85.187.183.17). Everybody welcome, just PM me.

5
Other / Anyone got configs?
« on: October 29, 2017, 06:06:44 PM »
Does anybody got configs for ProxMoxVE KVM and LXC setups for WHMCS? If you have any please send them to me to root@born2host.com. Thanks ppl.

6
I reinstalled the CentOS 7 and now I have full httpd.conf. I created 2 users - 1 for web hosting, 1 for online shop. I pointed the domains like I was doing in CWP6, did vhosts-ssl.conf, vhosts.conf, created SSL Certificates, ... All I was doing in CWP6 and there my pages was working. Now I see:
Code: [Select]
Are you the Administrator?
You should add your website content to the directory /var/www/html/.
To prevent this page from ever being used, follow the instructions in the file /etc/httpd/conf.d/welcome.conf.
Which points me to this that Apache is not working correctly. I have enabled LoadModule userdir_module modules/mod_userdir.so in httpd.conf and all other necessary files for it, but /home/USER/public_html/ is not shown. It`s asking me to put the files in /var/www/html. Am I doing something wrong?
Please fast advice how to fix this.

7
I figured out to install CentOS 7 on my old rig HP ProLiant DL380 G5, installed CWP and the only lines I have in Apache Configuration are:
Code: [Select]
ExtendedStatus On
Include /usr/local/apache/conf/sharedip.conf
Include /usr/local/apache/conf.d/*.conf
I will try to rebuild apache. Hope it helps, but if not I hope somebody to paste as an answer httpd.conf from Apache 2.4.27. Strange but the rebuild was fast. The config file is still 3 lines. Please share a working config.

8
SSL / Just a proposal to the developers
« on: October 09, 2017, 11:20:29 AM »
How about to try something like this:
Code: [Select]
ip=`dig +short myip.opendns.com @resolver1.opendns.com`
rev=`dig -x $ip | grep PTR | awk '{print $4}'`
if [ ! $rev == "" ]; then
        wget https://dl.eff.org/certbot-auto
        chmod a+x certbot-auto
        /usr/local/src/certbot-auto certonly --agree-tos --renew-by-default -d $rev && cp -f /etc/letsencrypt/live/$rev/fullchain.pem /etc/pki/tls/certs/$rev.crt && cp -f /etc/letsencrypt/live/$rev/privkey.pem /etc/pki/tls/private/$rev.key && cp -f /etc/letsencrypt/live/$rev/chain.pem /etc/pki/tls/certs/$rev.bundle
else
        standart cert creation from CWP
fi
If the IP of the user resolves to a domain (which is less likely to happen) the installer to create a green certificate for CWP:2031, if not - create standart CWP certificate.

9
SSL / Certbot installation and requesting certificate (CentOS 6)
« on: October 08, 2017, 11:30:15 AM »
Ok. Let`s make our life more easy with GREEN status bar in most web browsers for FREE with Certbot from https://www.eff.org
First of all let`s get Certbot for CentOS 6 in root directory.
Change current directory to /root:
Code: [Select]
cd /root
Download Certbot from the official website:
Code: [Select]
wget https://dl.eff.org/certbot-auto
Now let`s make the file executable:
Code: [Select]
chmod a+x certbot-autoNow let`s create our first SSL Certificate:
Code: [Select]
./certbot-auto certonly --email youremail@server.com --agree-tos --renew-by-default -d your-domain.comyouremail@server.com -> replace by real email
your-domain.com -> replace with your domain
you can create your-domain.com, www.your-domain.com, mail.your-domain.com, ftp.your-domain.com, whatever.your-domain.com certificate BUT ...
DOMAIN OR SUBDOMAIN MUST BE POINTED TO A RECORD IN DNS SERVER!!! SUBDOMAINS POINTED TO CNAME RECORD WILL RETURN ERROR AND THE SSL CERTIFICATE WILL NOT BE CREATED!!!

Once your SSL Certificate is created with the key, they will be placed as it follows:
SSL Certificate:
Code: [Select]
/etc/letsencrypt/live/your-domain.com/fullchain.pemSSL Key:
Code: [Select]
/etc/letsencrypt/live/your-domain.com/privkey.pemNow let`s check your SSL Certificate:
Code: [Select]
https://www.ssllabs.com/ssltest/analyze.html?d=your-site.com&latestLet`s try the renew:
Code: [Select]
./certbot-auto renewIf you get something like this:
Code: [Select]
Saving debug log to /var/log/letsencrypt/letsencrypt.log

-------------------------------------------------------------------------------
Processing /etc/letsencrypt/renewal/your-domain.com.conf
-------------------------------------------------------------------------------
Cert not yet due for renewal

The following certs are not due for renewal yet:
  /etc/letsencrypt/live/your-domain.com/fullchain.pem (skipped)
No renewals were attempted.
Than you are ok.
Let`s add Certbot renew to crontab:
Code: [Select]
crontab -eLet`s set it to try the renew twice a day:
Code: [Select]
0 0,12 * * * /root/certbot-auto renew >> /var/log/le-renew.log
Close and save the crontab. You are done. Have fun with your new SSL Certificate and GREEN bar in your browser for FREE.

10
SSL / Certbot installation and requesting certificate (CentOS 7)
« on: September 16, 2017, 05:08:25 AM »
Hello people,
As I`m having customers asking for Dedicated servers and some of them request different OS than CentOS I had to do it. The last customer asked for Ubuntu 16.04 LTS to run some game server and he get it. When he asked for help to install ssl on his page I got confused. I searched a bit on the internet and I found certbot which I found for very easy to use and the strange part - it gave me a green bar certificate. Let`s see the installation:
-> Installing the EPEL repo
Code: [Select]
yum -y install epel-release-> Installing Certbot
Code: [Select]
yum -y install python-certbot-apache-> Checking if Apache is running
Code: [Select]
systemctl status httpdIf Apache is not running use the following command to start it:
Code: [Select]
systemctl start httpdor
Code: [Select]
service httpd startIf Apache is running just skip the above commands.
-> Check if your site is reachable using cURL:
Code: [Select]
curl your-site.com-> Request a certificate:
Code: [Select]
certbot --apache -d your-site.comor
Code: [Select]
certbot --apache -d your-site.com -d mail.your-site.com -d www.your-site.com -d ftp.your-site.com -d ....Note that certbot will check if your-site.com/mail.your-site.com and others have A record in the DNS server. If they don`t - will give an error. If everything is ok you will have to answer few simple questions like a recovery email if you lost your cert and should it always redirect to https than http and you`re done. Certbot is requesting certificatest from Let's Encrypt.
-> Check if you SSL is working
Code: [Select]
https://www.ssllabs.com/ssltest/analyze.html?d=your-site.com&latest-> Try to renew your SSL cert to see if it`s working
Code: [Select]
certbot renewIf you get output similar to this you are ok:
Code: [Select]
Saving debug log to /var/log/letsencrypt/letsencrypt.log

-------------------------------------------------------------------------------
Processing /etc/letsencrypt/renewal/example.com.conf
-------------------------------------------------------------------------------
Cert not yet due for renewal

The following certs are not due for renewal yet:
  /etc/letsencrypt/live/example.com/fullchain.pem (skipped)
No renewals were attempted.
-> Adding Certbot Renew to crontab
Code: [Select]
crontab -e-> Every 30 days 2h .... renew
Code: [Select]
30 2 * * * /usr/bin/certbot renew >> /var/log/le-renew.logClose and save the crontab. You are done. Have fun with your new SSL certificate.

11
CentOS 7 Problems / Can`t install CentOS7
« on: September 11, 2017, 03:26:10 PM »
Hi people,
I have one old rig HP ProLiant DL380 G5 with 2xQuad Core Xeon @ 3.00GHz, HP Smart Array P400, 32GB DDR2 ECC RAM, 2x73GB SAS 15k RPM + 6x500GB SATA III, 2xGigabit LAN + 2x1000W PSU. Today I tried to install CentOS 7 on it and guess what - it didn`t see my hard drives. None of them. I was reading on centos.org that they support P400 iscsi drivers, but not on the installer. I switched off the RAID Controler - the same, still no HDDs. How I`m supposed to install CentOS 7 when it doesn`t see my hard drives? and later to install the drivers for them? WTF? More strange thing is that on CentOS6 Minimal install it see all my hard drives with RAID 1+0 on. For me it`s strange that old version of RHEL based Linux supports SCSI/SAS/SATA and the new version doesn`t. If anybody have an idea how to install CentOS7 on SAS/SATA HDD please tell me.

12
CentOS Configuration / IPv6 on CentOS 6 with autostart on boot
« on: August 16, 2017, 07:50:28 PM »
Hello people,
Here I`m going to give you a how to make an IPv6 Configuration for your CentOS 6 with an auto start script.
First of all you will need an account in TunnelBroker.net. Once you make an account and login to it, go to Create Regular Tunnel. On the first line write down the public IP address of your CentOS 6 machine. On Available Tunnel Servers:
Code: [Select]
ping -c 5 <tunnel server IP> one by one and find the best one for you and select it. Than press Create tunnel. Go back on the Main Page and select your tunnel. Copy the IPv6 address from Client IPv6 Address:
Go to /etc/init.d/ and run
Code: [Select]
nano -w ipv6.
Paste inside this code and replace with your Client IPv6 Address:

Code: [Select]
#!/bin/bash

start(){
        echo "Starting ipv6 ..."
        ifconfig sit0 up
        ifconfig sit0 inet6 tunnel ::216.66.87.14
        ifconfig sit1 up
        ifconfig sit1 inet6 add Client IPv6 Address::2/64
        ifconfig sit1 inet6 add Client IPv6 Address::3/64
        ifconfig sit1 inet6 add Client IPv6 Address::4/64
        ifconfig sit1 inet6 add Client IPv6 Address::5/64
        route -A inet6 add ::/0 dev sit1
}

stop(){
        echo "Stopping ipv6 ..."
        ifconfig sit0 down
        ifconfig sit1 down
}

restart(){
        echo "Restarting ipv6 ..."
        stop
        sleep 5
        stop
        sleep 5
        start
}
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        restart
        ;;
  *)
        echo "Usage: ipv6 {start|stop|restart}"
        exit 1
esac

exit 0

You can continue adding IPv6 addresses after ifconfig sit1 inet6 add Client IPv6 Address::5/64 as much as you want until you follow the rules for the IPv6.
Example of the Client IPv6 Address:
Code: [Select]
2001:470:1d1c:28ed::2/64Close your file with Ctrl+X and press Y to save it.
Execute the following commands:
Code: [Select]
chmod 755 ipv6          --> Change the permissions of the file to be executable
chkconfig ipv6 on        --> Adding the file to system start
service ipv6 start        --> Starting the IPv6 on your system
ping6 -c5 ipv6.google.com     --> Test your IPv6 configuration
When you reboot your system or it get rebooted by any reason the script will start alone and you don`t need to add everything by hand one by one. I wrote this script for me because I got angry after every reboot of the developing machine to add every time the IPv6 stuff again and again.
You don`t need to reboot your server to start the IPv6.
One more thing:
Login with root to your CWP6.admin panel, go to Services Config, Services Monitor and select the ipv6 to be watched for stopping. Click save and you`re done. Have fun with your new IPv6.
(Don`t be greedy to take /64 and /48 unless you finish the IPs from /64 which is close to unbelievable. In /64 you have 18,446,744,073,709,551,616 IP addresses, so unless you`re the ISP which is giving 2,635,249,153 IPs per customer (and you have all 7,000,000,000 people on the earth as customers) you are not able to finish the /64).  ;D That`s it. Have fun.

13
New Modules / WHMCS integration with CWP
« on: June 29, 2017, 08:03:02 PM »
Hello guys,
After having so much problems with integration of WHMCS and CWP I rewrote the WHMCS module almost from zero. Ok, mine also has errors which I will fix and then I will provide it encoded free of charge with all the improvements. For the moment I will provide you a fixed copy from http://wiki.centos-webpanel.com/cwp-account-api which was the original. In the original one it`s supposed that you have option in WHMCS to register/transfer domain. In the fixed version you don`t need it. If you don`t have option for register/transfer domain then the user domain will become automatic user.your-server-domain-name.tld(ex. johndoe.server.com). If you have the option for registering/transfering domains then the domain will be what the user register/transfer (ex. my-domain-with-you.com).
How to install the script:
1. Download -> here <- the script in your /path/to/whmcs/modules/servers/ (ex. /home/hosting/public_html/modules/servers/)
2. Unzip it (unzip centoswebpanel.zip)
3. Login to your WHMCS Admin panel
4. Go to Setup -> Product/Services -> Servers
5. Press 'Create New Group' and name it how you want
6. Press 'Add New Server'
7. Scroll down to 'Server Details'
8. On 'Type' choose 'Centoswebpanel'
9. Open in your browser -> Random.org <- and choose a random generated password
10. Paste this password in the 'Access Hash' field and press 'Save Changes'
11. Paste this password in /usr/local/cwp/.conf/api_key.conf
12. Open /usr/local/cwp/.conf/api_allowed.conf with your favourite editor and enter inside the IP address of the WHMCS (if the WHMCS and CWP are on the same server than enter 127.0.0.1)
13. Go to Setup -> Product/Services -> Product/Services
14. Press 'Create a New Product'
15. Choose and write name of your product
16. Go to 'Module Settings' tab and choose 'Module Name: Centoswebpanel
17. In the settings shown below edit only Package Number (Package Number 1 is package with name 'default' in CWP, if you add new package it will be Package Number 2)
18. Choose 'Do not automatically setup this product' and press 'Save Changes'
Hooray! You are ready!!!
Don`t forget to fix the Pricing of the Product/Service that you offer :)
If you have any questions or problems please PM me or ask on root@born2host.com
The script is opensource. Tested on WHMCS 6.3.1 and 7.1.2. Have fun!
Please, if you download and use the script, leave a comment how is it working and on what version of WHMCS you tested it. It will be useful for me to fix errors and for other users to know on which versions of WHMCS is tested and working. Thank you.

14
How to / WHMCS+CWP Problem
« on: June 10, 2017, 11:32:15 AM »
Hello guys,
I have WHMCS 6.3.1 and CWP 0.9.8.249. I downloaded and installed the WHMCS module from the WiKi page. I fixed the permissions just in case. Put the IP of the WHMCS in the config and the hash in the key file.Did the configuration of the module like it`s shown on the payed one page. Tested the command in my browser IP:2030/api/?key=KEY&api=account_new&domain=DOMAIN&username=USERNAME&password=PASSWORD&package=PACKAGE-NUMBER&email=CLIENT-EMAIL&inode=10000&nofile=100&nproc=25 and I got status OK. In CWP I get the new user. I tested the command with cURL and again got status OK and saw the new user in the CWP. And here comes the problem:
When I try to add a new user from the WHMCS I see:
Code: [Select]
Order Accept Encountered Problems
Check All Fields (only lower caps are allowed and no special characters)!
The only place I don`t have a lower case strings is the Access Hash and I don`t input any special chars. The hash there is generated from random.org. The Access Hash is the same in the /usr/local/cwp/.conf/api_key.conf and in the WHMCS. Tryed to put htmlspecialchars(strtolower($params[""])) in the centoswebpanel.php but it didn`t help. Any idea how to fix this problem? Any help will be appreciated.

15
Other / Total OFF Topic(Need advice)
« on: May 04, 2017, 05:08:00 AM »
Hello guys,
I got my servers in the town connected to a gigabit fiber optic internet. Two years ago with my wife we decided that in the town is too crowded, too noisy and the air is too dirty, so we found and we bought a house in a small village 28km from the town. My problem is that the village is small and there`s only one company providing internet here and it`s a big sh*t so my connection to the servers got dropped every 5-10min and I have to start everything from the beginning. As I don`t have any XP with long range WiFi(just LAN) I need advice. In the town I have an apartment where I have 200Mbps internet connection, but as I live in the village I just pay for it without using it. So I decided to buy 2 antennas and to bring myself internet here. The distance is exactly 28km between the apartment and the house(if the GPS is correct). The apartment is in a block with 8 floors. It`s on the north part of the town and it`s up on the hill so it`s pretty high. I was reading a bit for this and I understand about the clear view between the two antennas. After I checked it on the way there are few trees which I think is not a very very big problem for the signal(ok, there might be loses but not that much). I was checking on internet for antennas and I stopped on this one: NBM365 Ubiquiti 3.65 GHz NanoBridge, airMAX, 22 dBi (2 Parts, NBM365+NB-OD3). As they say the range is 30+km, so I think it will be ok. But I`m not sure. Bringing UTP or Fiber to here is impossible(nobody wants to do it for 1 customer in a village with 100 people). Satellite internet - too expensive. If you have any XP with long range WiFi antennas please share it with me.

Pages: [1] 2