Skip to main content

Posts

Showing posts from March, 2019

apache 2.2 - how to find the server key

when I perform the following openssl s_client -connect 0.0.0.0:8006 I get the Server certificate as: -----BEGIN CERTIFICATE----- MIICSTCCAbKgAwIBAgIESfnb7zANBgkqhkiG9w0BAQUFADBpMQswCQYDVQQGEwJJ …. [1] From which destination does the machine take the "CERTIFICATE" with running the command "openssl s_client -connect 0.0.0.0:8006" ? , how can I learn from that about the server key or how to create the server key? [2] There is a command that creates new CRT and KEY that after it the MD5 shows they FIT: openssl req -new -x509 -nodes -out server.crt -keyout server.key [3] The question:there is a command who can convert server.crt file to server.key file ? because I know the "CERTIFICATE" and need to find his KEY (server.key). my default server key P

apache 2.2 - how to find the server key

when I perform the following openssl s_client -connect 0.0.0.0:8006 I get the Server certificate as: -----BEGIN CERTIFICATE----- MIICSTCCAbKgAwIBAgIESfnb7zANBgkqhkiG9w0BAQUFADBpMQswCQYDVQQGEwJJ …. [1] From which destination does the machine take the "CERTIFICATE" with running the command "openssl s_client -connect 0.0.0.0:8006" ? , how can I learn from that about the server key or how to create the server key? [2] There is a command that creates new CRT and KEY that after it the MD5 shows they FIT: openssl req -new -x509 -nodes -out server.crt -keyout server.key [3] The question:there is a command who can convert server.crt file to server.key file ? because I know the "CERTIFICATE" and need to find his KEY (server.key). my default server key PATH:…./Apache/Apache/conf/ssl.key/server.key

load balancing - nginx geo location module configuration using geo database?

I've setup nginx as a reverse proxy for a couple of apache backend/upstream servers. Using the href="http://dev.maxmind.com/geoip/legacy/geolite/" rel="nofollow noreferrer">GeoLite database from MaxMind, I'm trying to loadbalance requests between the two servers dependent on the clients country code. Nginx Configuration: geo $geo { default default; include geo.conf; } upstream default.backend { server 192.168.0.1:8080; #Server A server 192.168.0.2:8080; #Server B } upstream DE.backend { server 192.168.0.1:8080; #Server A } upstream US.backend { server 192.168.0.2:8080; #Server B } server { listen 80; server_name myserver.com; location / { proxy_pass http://$geo.backend; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forw

load balancing - nginx geo location module configuration using geo database?

I've setup nginx as a reverse proxy for a couple of apache backend/upstream servers. Using the GeoLite database from MaxMind, I'm trying to loadbalance requests between the two servers dependent on the clients country code. Nginx Configuration: geo $geo { default default; include geo.conf; } upstream default.backend { server 192.168.0.1:8080; #Server A server 192.168.0.2:8080; #Server B } upstream DE.backend { server 192.168.0.1:8080; #Server A } upstream US.backend { server 192.168.0.2:8080; #Server B } server { listen 80; server_name myserver.com; location / { proxy_pass http://$geo.backend; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } So I'm trying to send any German clients to server A, and U

centos6 - Running cron every 24 hours and start immediately

itemprop="text"> I want to run some script of python every 24 hours, at every 23:59:58 i want to kill the the job. I want to run python immediately. Thus I use this syntax bellow * */24 * * * cd /ftp/ftp1 && timeout -s 9 86398 python2.6 lpr_10.10.252.121.py 10.10.252.121 450 >> res_10.10.252.121.txt But on cron log, their script are not running. I've try to /etc/rc.d/init.d/crond restart Here are the log cron May 18 10:13:45 cisco-cumc crontab[31368]: (root) REPLACE (root) May 18 10:13:45 cisco-cumc crontab[31368]: (root) END EDIT (root) May 18 10:14:01 cisco-cumc crond[5090]: (root) RELOAD (/var/spool/cron/root) May 18 10:15:24 cisco-cumc crontab[31449]: (root) BEGIN EDIT (root) May 18 10:15:42 cisco-cumc crontab[31449]: (root) REPLACE (root) May 18 10:15:42 cisco-cumc

centos6 - Running cron every 24 hours and start immediately

I want to run some script of python every 24 hours, at every 23:59:58 i want to kill the the job. I want to run python immediately. Thus I use this syntax bellow * */24 * * * cd /ftp/ftp1 && timeout -s 9 86398 python2.6 lpr_10.10.252.121.py 10.10.252.121 450 >> res_10.10.252.121.txt But on cron log, their script are not running. I've try to /etc/rc.d/init.d/crond restart Here are the log cron May 18 10:13:45 cisco-cumc crontab[31368]: (root) REPLACE (root) May 18 10:13:45 cisco-cumc crontab[31368]: (root) END EDIT (root) May 18 10:14:01 cisco-cumc crond[5090]: (root) RELOAD (/var/spool/cron/root) May 18 10:15:24 cisco-cumc crontab[31449]: (root) BEGIN EDIT (root) May 18 10:15:42 cisco-cumc crontab[31449]: (root) REPLACE (root) May 18 10:15:42 cisco-cumc crontab[31449]: (root) END EDIT (root) May 18 10:15:46 cisco-cumc crontab[31451]: (root) LIST (root) May 18 10:15:57 cisco-cumc crond[5090]: (CRON) INFO (Shutting down) May 18 10:15:57 cisco-cumc crond[31471]: (CRON) S

iis 7 - IIS not showing index page after migration

I am trying to migrate my company intranet site form a Windows 2008 R2 server to a new Windows 2016 server (different computer name). I exported the application pools and site successfully and imported them into the new server successfully. I changed the bindings to the new server but one thing I noticed right off the bat was it was telling me the credentials were wrong. I checked the applicationHost.config file and the username used to connect is the support account but had no domain and the password is not viewable because it looks like it had some kind of encryption or something. So I changed the settings earlier to my domain\support account and it work and I was able to access everything in IIS properly. I checked everything I could think of but after the migration, I try to go to my site and it just has the IIS start page on it. I checked the defaultD

iis 7 - IIS not showing index page after migration

I am trying to migrate my company intranet site form a Windows 2008 R2 server to a new Windows 2016 server (different computer name). I exported the application pools and site successfully and imported them into the new server successfully. I changed the bindings to the new server but one thing I noticed right off the bat was it was telling me the credentials were wrong. I checked the applicationHost.config file and the username used to connect is the support account but had no domain and the password is not viewable because it looks like it had some kind of encryption or something. So I changed the settings earlier to my domain\support account and it work and I was able to access everything in IIS properly. I checked everything I could think of but after the migration, I try to go to my site and it just has the IIS start page on it. I checked the defaultDocument section in the config and added my index.aspx which is the index page of my site and then I started getting the error 0

windows server 2003 - 5 IP Addresses on a multi-homed NIC, 4 ping-able, what's wrong with the 5th?

Dell Server, broadcom NIC, 5 IP addresses all on the same subnet. Let's say 100.100.63.67-71. Windows Server 2003. From another system on the 100.100.63.* subnet, I can ping all IP addresses no problem. From a system on another subnet, say 100.100.58.*, I can ping all but one, the 100.100.63.70 address. It's in the middle of the IP range. In Win2003 server, I specify the default gateway once as 100.100.63.1. Each individual IP has a subnet mask of 255.255.255.0. I've verified they are all the same. I'm stumped... why would 100.100.63.70 not respond to pings from outside it's subnet, while the others will?

windows server 2003 - 5 IP Addresses on a multi-homed NIC, 4 ping-able, what's wrong with the 5th?

Dell Server, broadcom NIC, 5 IP addresses all on the same subnet. Let's say 100.100.63.67-71. Windows Server 2003. From another system on the 100.100.63.* subnet, I can ping all IP addresses no problem. From a system on another subnet, say 100.100.58.*, I can ping all but one, the 100.100.63.70 address. It's in the middle of the IP range. In Win2003 server, I specify the default gateway once as 100.100.63.1. Each individual IP has a subnet mask of 255.255.255.0. I've verified they are all the same. I'm stumped... why would 100.100.63.70 not respond to pings from outside it's subnet, while the others will?

ubuntu 14.04 - VPS Admin Panel

itemprop="text"> I got a simple question. I have this VPS hosted on Linode.com and I am currently using webmin and virtualmin. I have one domain, do not plan to have to multiple domains, I want subdomain and my dns will be be managed by my provider dns tool. I will be using php7, redmine, and install a nominatim instance meaning I will have mysql, php7, ruby, postgresql, passenger and will mainly use php7 with probably php7-fpm and also use smtp on ubuntu 14.04. Now, using webmin and virtualmin has been overly complicated to do anything. In fact, I spent most of time on the terminal than trying to set up the server through webmin/virtualmin. Now that you know my needs. Do you think that an admin panel + webhosting panel is useful for my specific case or could I simply use a basic lamp stack without all the cumbersomeness of admin p

ubuntu 14.04 - VPS Admin Panel

I got a simple question. I have this VPS hosted on Linode.com and I am currently using webmin and virtualmin. I have one domain, do not plan to have to multiple domains, I want subdomain and my dns will be be managed by my provider dns tool. I will be using php7, redmine, and install a nominatim instance meaning I will have mysql, php7, ruby, postgresql, passenger and will mainly use php7 with probably php7-fpm and also use smtp on ubuntu 14.04. Now, using webmin and virtualmin has been overly complicated to do anything. In fact, I spent most of time on the terminal than trying to set up the server through webmin/virtualmin. Now that you know my needs. Do you think that an admin panel + webhosting panel is useful for my specific case or could I simply use a basic lamp stack without all the cumbersomeness of admin panels. Everything got so messed up because of virtualmin that uses some sort of unique cgi/fcgi bin to transfer data and because its not compatible php7, I had to manually ed

linux - "Operation not permitted" on files over 2GB on ext4 filesystem

itemprop="text"> I have a bit of a mystery. I have an Ubuntu 17.04 system (upgraded from 16.04 LTS) using ext4 as it's main filesystem. I used wget and curl to download a 2.3GB iso, but i cannot mount it. In fact, I cannot do any operation on it: md5sum, wc, cat, mount -o loop, etc... without getting an "operation not permitted". I can "rm" it, though. I am root, and the perms on the file are 644. I cannot do an "lsattr" nor "chattr" on it without "operation not permitted". I have proven that it's exactly related to the filesize as I did this: dd if=/dev/zero of=/tmp/test.iso bs=1M count=2047 and I am able to read test.iso as it's 1M less than 2G, but if i change it to 2048, I am unable to read the file. I understand that ext4 has a bare minimum limit of 16GB, but I am way under tha

linux - "Operation not permitted" on files over 2GB on ext4 filesystem

I have a bit of a mystery. I have an Ubuntu 17.04 system (upgraded from 16.04 LTS) using ext4 as it's main filesystem. I used wget and curl to download a 2.3GB iso, but i cannot mount it. In fact, I cannot do any operation on it: md5sum, wc, cat, mount -o loop, etc... without getting an "operation not permitted". I can "rm" it, though. I am root, and the perms on the file are 644. I cannot do an "lsattr" nor "chattr" on it without "operation not permitted". I have proven that it's exactly related to the filesize as I did this: dd if=/dev/zero of=/tmp/test.iso bs=1M count=2047 and I am able to read test.iso as it's 1M less than 2G, but if i change it to 2048, I am unable to read the file. I understand that ext4 has a bare minimum limit of 16GB, but I am way under that. The files appear to be created just fine. I did a thorough search before posting and nothing is related to my problem. No, it's not FAT. It's e

windows - How to make IIS 7/8 rewrite and redirect URL with DB Provider

Please, have patience if this question is long but I have never worked on this complex program which was developed by colleague of mine before I was recruited. We have this web application running on .NET Framework v2.0 CLR. Anyway, this program is not natively written in C# but we must use a framework called Instant Developer which converts the code in a .NET application. The application runs in a Windows Server 2012 R2 under IIS 8 and with SQL Server 2014 R2. So, inside this application there is a very big directory called "photos" which contains a photo of each work a user completes. When the program was developed, our customer told us that very few photos were compulsory so my colleague thought that a unique directory was enough. But in this years the requirements have changed. Therefore, now a photo must be taken for each work and so that di

windows - How to make IIS 7/8 rewrite and redirect URL with DB Provider

Please, have patience if this question is long but I have never worked on this complex program which was developed by colleague of mine before I was recruited. We have this web application running on .NET Framework v2.0 CLR. Anyway, this program is not natively written in C# but we must use a framework called Instant Developer which converts the code in a .NET application. The application runs in a Windows Server 2012 R2 under IIS 8 and with SQL Server 2014 R2. So, inside this application there is a very big directory called "photos" which contains a photo of each work a user completes. When the program was developed, our customer told us that very few photos were compulsory so my colleague thought that a unique directory was enough. But in this years the requirements have changed. Therefore, now a photo must be taken for each work and so that directory today contains more than 5 millions of files. Consequently, it is not openable anymore by Windows Explorer, if I try the ser

ftp - User permissions linux. (proftpd / nginx)

itemprop="text"> I've been having a complete nightmare trying to configure proftpd. I've got proftp server working with an sql database. However I want to have any files uploaded able to viewed by the webserver running on the same box. The folders get created in /var/tmp/ as rwx------ 2 ftpuser ftpgroup 4096 Oct 8 20:35 50730c4346512 drwx------ 2 ftpuser ftpgroup 4096 Oct 8 20:38 50730f3a811ca I've tried adding www-data to group with the following usermod -g www-data ftpuser But this doesn't allow the web server access. In proftpd.conf I have the following umask set Umask 0022 It doesn't seem to make a difference what I set that value to. /etc/group (sure I've messed up one of these two but I'm getting desperate) ftpgroup

ftp - User permissions linux. (proftpd / nginx)

I've been having a complete nightmare trying to configure proftpd. I've got proftp server working with an sql database. However I want to have any files uploaded able to viewed by the webserver running on the same box. The folders get created in /var/tmp/ as rwx------ 2 ftpuser ftpgroup 4096 Oct 8 20:35 50730c4346512 drwx------ 2 ftpuser ftpgroup 4096 Oct 8 20:38 50730f3a811ca I've tried adding www-data to group with the following usermod -g www-data ftpuser But this doesn't allow the web server access. In proftpd.conf I have the following umask set Umask 0022 It doesn't seem to make a difference what I set that value to. /etc/group (sure I've messed up one of these two but I'm getting desperate) ftpgroup:x:2001:www-data www-data:x:33:ftpgroup /etc/passwd www-data:x:33:33:www-data:/var/www:/bin/sh proftpd:x:108:65534::/var/run/proftpd:/bin/false ftp:x:109:65534::/srv/ftp:/bin/false ftpuser:x:2001:33:proftpd user www-data:/bin/nu

ldap - Active Directory Authentication Through a Trust and Querying For Users From Trusted Domain

Domain A (Forest Tree Root) (Primary Domain) Domain B (Direct Outbound) (Direct Inbound) There is a two way trust between the two Forests Domain A/B. This scenario is used to connect two companies together. Now, lets say we have an application that uses active directory to authenticate on Domain A. A user from Domain B is added to a group that exists in Domain A that allows them access to that application. This applications uses ADSI to connect to the Domain A domain controller for user authentication. First Question: By using ADSI from the domain controller on Domain A, will it know to traverse the trust and validate the user in Domain B? Or does the application need to specifically point to the domain controller on Domain B as well. Second Question: To get a listing of all users in Domain B from Domain A will I

ldap - Active Directory Authentication Through a Trust and Querying For Users From Trusted Domain

Domain A (Forest Tree Root) (Primary Domain) Domain B (Direct Outbound) (Direct Inbound) There is a two way trust between the two Forests Domain A/B. This scenario is used to connect two companies together. Now, lets say we have an application that uses active directory to authenticate on Domain A. A user from Domain B is added to a group that exists in Domain A that allows them access to that application. This applications uses ADSI to connect to the Domain A domain controller for user authentication. First Question: By using ADSI from the domain controller on Domain A, will it know to traverse the trust and validate the user in Domain B? Or does the application need to specifically point to the domain controller on Domain B as well. Second Question: To get a listing of all users in Domain B from Domain A will I be able to query this for example in powershell using ADSI/LDAP from a domain controller in Domain A or will I specifically need to hit a domain controller in Domain B? Than

Can someone explain the physical architecture of RAID 10 in complete layman's terms?

I am a newbie in the world of storage and I am having a hard time digesting the physical architecture of some of the RAID levels. I am particularly interested in RAID 10, and 50. I asked the question specifically about RAID 10, because I feel if I understand that, I'll understand the other. So, I get the definition of RAID 10 - "minimum 4 disks, a striped array whose segments are mirrored". If I've got 4 disks and Disks 1 and 2 are a mirrored pair, and Disks 3 and 4 are a mirrored pair - where does the data get striped? Thanks.

Can someone explain the physical architecture of RAID 10 in complete layman's terms?

I am a newbie in the world of storage and I am having a hard time digesting the physical architecture of some of the RAID levels. I am particularly interested in RAID 10, and 50. I asked the question specifically about RAID 10, because I feel if I understand that, I'll understand the other. So, I get the definition of RAID 10 - "minimum 4 disks, a striped array whose segments are mirrored". If I've got 4 disks and Disks 1 and 2 are a mirrored pair, and Disks 3 and 4 are a mirrored pair - where does the data get striped? Thanks.

Sar: Free memory statistics (including buffers, cache)

itemprop="text"> The free commands gives the amount of free memory in two forms: completely free memory (the Mem line) and disposable memory used for caches and buffers (the -/+ buffers/cache line): -bash-3.2$ free -m total used free shared buffers cached Mem: 16057 15173 884 0 17 2520 -/+ buffers/cache: 12635 3422 Swap: 12287 4937 7350 In this example, there are 884 MB of free memory excluding buffers and cache, and 3422 MB of free memory including buffers and cache. How can I get the second measurement (free memory, including buffers and cache) in sar ? itemprop="text"> class="normal">Answer The -r flag for sar will give you kbmfree, kbmemused, kbbuffers, and kbcached. It doesn't, unfortunately, total them like the -/+ buffers/cache

Sar: Free memory statistics (including buffers, cache)

The free commands gives the amount of free memory in two forms: completely free memory (the Mem line) and disposable memory used for caches and buffers (the -/+ buffers/cache line): -bash-3.2$ free -m total used free shared buffers cached Mem: 16057 15173 884 0 17 2520 -/+ buffers/cache: 12635 3422 Swap: 12287 4937 7350 In this example, there are 884 MB of free memory excluding buffers and cache, and 3422 MB of free memory including buffers and cache. How can I get the second measurement (free memory, including buffers and cache) in sar ? Answer The -r flag for sar will give you kbmfree, kbmemused, kbbuffers, and kbcached. It doesn't, unfortunately, total them like the -/+ buffers/cache column like the free command, so you will have to pipe it through an awk or perl script to total them. Try this: sar -r |\ awk ' { if (NR > 3 && $3 !=

email - Is This Feasible - Running MailWash on a dedicated machine to pre-check

itemprop="text"> Is This Feasible - Running MailWash on a dedicated machine to pre-check 80-100 email accounts before end-users check with Outlook? We have some major SPAM issues at my company with some users receiving over 1000 SPAM messages per day. Our mail is web-based and managed by a local ISP that does not offer any SPAM filtering at all. All user are required to check their mail with Outlook 2003/2007. What are some of the issues that I might face if I run MailWAsh on a dedicated machine to precheck everyones mail numerous times per day. If you arent familiar with MailWash, thats exactly what it does, although it is meant to run locally on each machine. It prechecks mail, weeds out SPAM, and leaves legimate mail. When the user send/receives in Outlook, they hopefully receive only the legit mail left on the server.

email - Is This Feasible - Running MailWash on a dedicated machine to pre-check

Is This Feasible - Running MailWash on a dedicated machine to pre-check 80-100 email accounts before end-users check with Outlook? We have some major SPAM issues at my company with some users receiving over 1000 SPAM messages per day. Our mail is web-based and managed by a local ISP that does not offer any SPAM filtering at all. All user are required to check their mail with Outlook 2003/2007. What are some of the issues that I might face if I run MailWAsh on a dedicated machine to precheck everyones mail numerous times per day. If you arent familiar with MailWash, thats exactly what it does, although it is meant to run locally on each machine. It prechecks mail, weeds out SPAM, and leaves legimate mail. When the user send/receives in Outlook, they hopefully receive only the legit mail left on the server. Answer Yes. It's pretty much the same way that I have my family's postfix/linux mail server set; due to some bad filtering when I first started, mailscanner

centos6 - iptables outgoing default policy is accept, but some ports appear blocked

itemprop="text"> I'm new to servers and iptables. I have a web app (happens to be bugzilla) running on my Centos 6.7 apache/httpd server, and it attempts to connect out to the web (updates.bugzilla.org) via port 80. It also attempts to connect out (to smtp.gmail.com) using port 465. However, it cannot. This is in spite of having a default output policy of ACCEPT and having opened the relevant ports for input. I'm not sure where to go from here. Where should I look to begin troubleshooting this? What are the likely culprits? Some output: $ service iptables status Table: filter Chain INPUT (policy ACCEPT) num target prot opt source destination 1 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 2 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED 3 ACCEPT tcp -- 0.0.0.0/0

centos6 - iptables outgoing default policy is accept, but some ports appear blocked

I'm new to servers and iptables. I have a web app (happens to be bugzilla) running on my Centos 6.7 apache/httpd server, and it attempts to connect out to the web (updates.bugzilla.org) via port 80. It also attempts to connect out (to smtp.gmail.com) using port 465. However, it cannot. This is in spite of having a default output policy of ACCEPT and having opened the relevant ports for input. I'm not sure where to go from here. Where should I look to begin troubleshooting this? What are the likely culprits? Some output: $ service iptables status Table: filter Chain INPUT (policy ACCEPT) num target prot opt source destination 1 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 2 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED 3 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 4 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 t

virtualization - Permission denied for root to ESXi host

itemprop="text"> I have an ESXi host running a Windows 2008 R2 server VM with vCenter installed. Upon joining the Host to vCenter, suddenly I could not log directly onto the host with the vSphere client using my original root username/password. The root user/pass works in console just fine, but get "insufficient privileges" when I try to use the vSphere client. The problem being the power went out, turning off the vCenter VM (and the rest [Active Directory]), so now I can't connect to vCenter to start my virtual machine's again nor can I connect directly to the host. What are my options to at least get the vCenter VM started again? Answer Are your VMs set to startup on Power on? If yes, you should be able to reboot the physical server to bring the virtual hosts back up. This

virtualization - Permission denied for root to ESXi host

I have an ESXi host running a Windows 2008 R2 server VM with vCenter installed. Upon joining the Host to vCenter, suddenly I could not log directly onto the host with the vSphere client using my original root username/password. The root user/pass works in console just fine, but get "insufficient privileges" when I try to use the vSphere client. The problem being the power went out, turning off the vCenter VM (and the rest [Active Directory]), so now I can't connect to vCenter to start my virtual machine's again nor can I connect directly to the host. What are my options to at least get the vCenter VM started again? Answer Are your VMs set to startup on Power on? If yes, you should be able to reboot the physical server to bring the virtual hosts back up. This would be found on the configuration tab for each ESXi host in the Vsphere console under "Software> Virtual Machine Startup/Shutdown". You'd then click on properties in the top righ

networking - Need help choosing a router and/or wireless AP for a 15-40 person office?

I've been tasked with improving the wireless network at my office / co-working space. I'm not particularly experienced with business network infrastructure, but I'm more experienced than probably all of the other people here and have volunteered to figure it out. Our main issue is that our wifi network is lacking. Typically we have around 30 wifi devices in the office at a time, half of which are phones and half of which are laptops, but sometimes it can go as high as 60 - 80 devices. For example, we were a jam site for the last global game jam and had 40 laptops vying for wifi bandwidth, and some untold number of mobile devices. Most of these laptops are running software like Dropbox or Google Drive, which sucks up a lot of bandwidth. Occasionally people may be streaming video and audio. We also regularly do video conference calls