• PHP
  • Ruby on Rails
  • MySQL
  • Linux
    • SELINUX
    • Fedora
    • debian
  • Apache
  • nginx
  • AJAX
Albertech.net

Category Archives: Linux

Fix: Windows 7 clients unable to connect to Samba 3

January 14, 2015 2:39 pm / Albertech.net

If you are using Samba 3 and have issues with Windows 7 clients connecting to the share, the easiest fix is to upgrade to Samba 4.

A recent Windows security update released in Fall 2014 causes an error in Samba “Server exit (failed to receive smb request)” and on the Windows end “The specified server cannot perform the requested operation”. This appears to be compatibility issue with Samba 3.X and Windows 7. Rolling back the Windows update makes the problem disappear. So, the best option is to upgrade to Samba 4.

Before you upgrade, make sure you back up the existing smb.conf file. Upgrading Samba will overwrite the existing smb.conf file. In RedHat, use yum to remove the samba-common and samba libraries and install the samba4 package.

 

 

Share this:

  • Facebook
  • Google
  • Twitter
  • Print
  • Email
Posted in: Linux / Tagged: samba, windows 7

Preserve remote IP address with HAProxy on CENTOS

March 20, 2014 7:05 am / Albertech.net

If you install HAProxy on your server, you will notice that the remote IP address in the logs and webapps will display the IP of the proxy and not the remote IP address of the client. You can set HAProxy to forward the client IP address to the web server via the “forwardfor” configuration. Once that is done, configure the web server to read the forwarding IP address header.

Make sure you have the following configuration for HAProxy: /etc/haproxy/haproxy.cfg

option http-server-close
option forwardfor       except 127.0.0.0/8

 

If you are using Lighttpd, there is a module called mod_extforward that you can set to forward the original IP address:

http://redmine.lighttpd.net/projects/1/wiki/Docs_ModExtForward

 If you are using Apache, here are the instructions to preserve the remote IP address:

Install Apache Mod_Extract_Forwarded package: (you need to have the EPEL repository)

yum install mod_extract_forwarded

Configure: /etc/httpd/conf.d/mod_extract_forwarded

MEFaccept 127.0.0.1

Replace the 127.0.0.1 with your proxy IP address (e.g. 192.168.50.50)

Restart Apache

apachectl restart

Share this:

  • Facebook
  • Google
  • Twitter
  • Print
  • Email
Posted in: Apache, Linux / Tagged: haproxy

Puppet fileserver configuration with Scientific Linux 6.1 and SELINUX

April 18, 2012 4:15 pm / Albertech.net

The fileserver in Puppet is useful for quickly centralizing configuration files for multiple servers. It works well for serving small text configuration files to clients, but not recommended for large files since it places them into memory before sending them out. For larger files, I recommend using git or rsync instead since it doesn’t affect the performance of the puppetmaster server.

After installing it on Scientific Linux 6.1, I had to go through some extra steps because of the SELINUX restrictions. Here’s the steps I went through to get the Puppet fileserver working.

Read More →

Share this:

  • Facebook
  • Google
  • Twitter
  • Print
  • Email
Posted in: Puppet, SELINUX / Tagged: fileserver, puppet, SELinux

Removing gnome from Scientific Linux

March 28, 2012 2:38 pm / Albertech.net

I recently had to remove the gnome GUI from a server running Scientific Linux (6.2) and had to go through a few steps to make it boot up properly.

  1. To remove Gnome from Scientific Linux, run the following command (while running outside of the GUI). This will remove all related applications related to the Gnome including Mozilla/etc.
    yum groupremove "GNOME Desktop Environment"
  2. Next, you will need to make sure your runlevel is set to 3. Otherwise, you won’t be able to boot up into text mode. The run level in RedHat/CentOS/Fedora/Scientific Linux is set to 5 for Gnome/KDE. You’ll need to change the 5 to a 3.
    Edit /etc/inittab as root and change the runlevel from 5 to 3.
    id:3:initdefault:
  3. Restart the server. It should boot up in text mode.

Share this:

  • Facebook
  • Google
  • Twitter
  • Print
  • Email
Posted in: Linux / Tagged: remove gnome

Fix: Private key refused for SSH on new install of Fedora CentOS

March 1, 2012 2:52 pm / Albertech.net

If you are setting up SSH public key authentication in a new Fedora/CentOS install, you must make sure the SELINX configuration is setup correctly for the /root/.ssh folder on the server.

The ~.ssh/ folder is not created on a new install. If you manually create the folder, set the SELINUX permissions with this command:

restorecon -R -v /root/.ssh

Another tip: If you are using the PuTTY Key generator to generate the public key, make sure you copy and paste the text into a single line in the /root/.ssh/authorized_keys file. Each line of the authorized_keys file should have the following: ssh-rsa (key contents) imported-openssh-key

Share this:

  • Facebook
  • Google
  • Twitter
  • Print
  • Email
Posted in: Fedora / Tagged: Fedora, ssh

Post Navigation

← Older Posts
 

Categories

  • AJAX
  • Android
  • Apache
  • Canon Cameras
  • Cloud
  • CMS
  • Computer Mods
  • Conferences
  • Deals
  • debian
  • Fedora
  • Flash
  • Frameworks
  • git
  • Hardware
  • HTML
  • IDE
  • iPhone
  • iPhone App Review
  • jQuery
  • Linux
  • Mac OS X
  • MySQL
  • nginx
  • PHP
  • portfolio
  • Puppet
  • Ruby on Rails
  • Script Reviews
  • SELINUX
  • Software
  • Software Review
  • SQL Server
  • statistics
  • Tech
  • Tomcat
  • Uncategorized
  • VMWARE
  • VPS
  • Windows
  • wordpress
  • Zend Framework

Blogroll

  • DragonAl Flickr
  • Dropbox – Free 2GB Account
  • James' Blog
  • Javascript Compressor
  • PHP Builder Community
  • PHP-Princess.net
  • Rubular – Regular Expression Validator
  • The Scale-Out Blog
  • Tiny MCE

Tags

activation AJAX android antec Apache AWS awstats canon coda codeigniter debian enclosure external free G1 install vmware tools Internet Explorer iphone 5 jquery Linux mx-1 MySQL office 2007 OSX photoshop PHP plugin plugins portfolio redesigned website review rewrite script security SELinux ssh tinymce tutorial upgrade VMWARE vmware server wordpress wordpress mu XSS zend framework
© Copyright 2013 Albertech.net
Infinity Theme by DesignCoral / WordPress
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.