Server :: Putting IP Blocking In A Separate Conf File?

Jan 1, 2010

Running Red Hat (not sure of the build atm) and I need to be able to put all of the IP blocking in a separate file. It will eventually be uploaded to a large number of hosting accounts, and modified from time to time...so it isn't feasible to modify that many httpd.conf files each time we need to add an IP to be blocked. In httpd.conf I can add the "Deny from" line to the following directive and blocks it just fine:

Code:

<Directory "/var/www/html">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews

[code]....

There is an include to pick up all *conf files in ../conf.d, and everything else in there is working just fine. I created a file called robots.conf; it currently has a set of mod_rewrite rules which work. So I added this to that file:

Code:

<Directory "/var/www/html">
Order allow,deny
Allow from all
Deny from 123.456.789.098
</Directory>

It is not blocking access from the IP with it in there.I've done all of the usual things; restarted Apache, cleared browser cache etc. I can also block it using that same directive in a local .htaccess.

View 2 Replies


ADVERTISEMENT

General :: Putting The Password In Lilo.conf?

May 27, 2009

I wanted to put password in lilo.conf file. I added this line but doesn't seem to work out Code: password=vickey. I also did Code: lilo -v Is there any thing missing

View 8 Replies View Related

Ubuntu Networking :: How To Tamed Resolvconf From Putting Stale/old Info In Resolv.conf

Feb 3, 2010

I have resolvconf installed to prevent multiple programs from fighting to update /etc/resolv.conf at the same time an corrupting it.From what I understand resolvconf a package found in the repos is suppose to act as the gatekeeper to /etc/resolv.conf and all programs must go thru it to update resolv.conf. Hence /etc/resolv.conf is written in a orderly manner.

from time to time though something goes awry and resolvconf writes old, wrong stale into /etc/resolv.conf, for a connection that may be down or no longer exists along with the correct info for the current connection.Usually i would fix this by uninstalling and reinstalling the resolvconf package.I was tired of this so i went digging around in

/etc/resolvconf and found the subdirectory
/etc/resolvconf/run/interface

This is where it looks like resolvconf caches interface info that goes into

/etc/resolv.conf

I think what happens is resolvconf is suppose to clean this up in an orderly way but sometimes old interface files may be left here.So for instance in mine were the files eth0 and wlan0.with dns info for each stored in the relative file. I no longer have an eth0 only a wlan0 so resolvconf was still pulling info from both

/etc/resolvconf/run/interface/wlan0 and /etc/resolvconf/run/interface/eth0

with the result of an incorrect dns info in /etc/resolv.conf To make a long story short I just deleted /etc/resolvconf/run/interface/eth0 and was good to go. So if you are using resolvconf and run into this problem you may use this work around.

View 2 Replies View Related

Server :: Using Separate File Systems For Swap And / While Installing Servers?

Dec 16, 2009

I am still puzzled by IT guru who still install a server version of Linux using the default partition system. I am curious about what the IT guys in this forum think about this, even when the server is part of a cluster.

View 1 Replies View Related

Ubuntu Servers :: Separate Virtual Machines For Apache, Mysql, File Server?

Jul 11, 2011

I'm working on a side project where I would like to install three ubuntu server systems,each with only one task.So server0 would be the apache server, server1 would be the database and server2 would be the file server.which key terms I should be researching?

View 9 Replies View Related

General :: What Is The Use Of /etc/sysconfig/httpd Conf File In Apache Server

Aug 4, 2010

what is the role of /etc/sysconfig/httpd configuration file in apache server .

View 2 Replies View Related

Security :: Grub.conf File Has Been Cleared On RHEL V4.7 Server

Mar 26, 2010

I am running Red Hat Enterprise Linux AS release 4 (Nahant Update 7). The server was recently rebooted and wouldn't come up. After some investigation we found that the system would not boot because several files had been zero'd out (not deleted):

* All of these files had a date of March 11, 2010 with a time 03:46
* A zero byte file called /halt was also found with a date of 08:46

We could manually boot to the latest kernel, but none of the startup scripts would run. We analyzed the system looking for any file created on March 11 that were also 0 bytes. Once we had a list, we were able to determine that the system could be recovered without a full blown reinstallation of the OS.

We did a rescue boot from the installation CD, mounted the system volume privately, and edited the grub.conf file. We then brought up the network and copied the needed files from another RHEL v4.7 system. Rebooted the server and check the OS, databases, and apps.

My question is - Has anyone seen this behavior before? I seems like we may have been cracked or at the very least someone has cleared the files needed to recover the system smoothly.

View 3 Replies View Related

General :: Using For The Server - Bash: /etc/init.d/dhcpd.conf: No Such File Or Directory

Aug 24, 2010

# /etc/init.d/dhcpd.conf -bash: /etc/init.d/dhcpd.conf: No such file or directory what is the problem? and how to configure out "joe"

View 5 Replies View Related

CentOS 5 Server :: Loading Multiple Virtual Host Conf Files From Httpd.conf?

Jun 1, 2009

I've been scanning the apache2 docs for the past few days and have not come up with an answer my following issue:

In my httpd.conf file, at the very end, I have the line

Include conf/vhosts/vhost_*.conf

However, when I run apache checkconfig or try to start apache, it gives me the error:

httpd: Syntax error on line 993 of /etc/httpd/conf/httpd.conf: Could not open configuration file /etc/httpd/conf/vhosts/vhost_1.conf: Permission denied

It appears as if the Include line is correct - in terms of it grabbing the first virtual host conf file. However, I'm confused on the permissions. the /etc/httpd folder is owned by root:root, as are the subfolders. As a test, I chown'd the conf/vhost folder combination and all the vhost files to apache:apache to see if that made a difference, and it appeared to make no difference at all. The log files don't contain anything (assumed because apache isn't starting). If I place the contents of the vhosts in a singular vhosts.conf it works - with the permissions set to root:root. I'd like to avoid having to use one vhosts conf for the configuration I'm trying to achieve - as it would make my life a lot easier.

View 3 Replies View Related

General :: Putting A Remote Syslog Into Its Own File?

Aug 11, 2010

I have a Tomato router and it has the capability to have its logs go to a external server. syslog is the obvious choice for this. So I enabled remote logging on my linux server's syslogd (syslogd -r) and I can see all of the logs in /var/log/syslog. What I want to do is take everything that comes from the IP of my router (10.0.0.1) and divert it to its own file like /var/log/tomato to avoid polluting my syslog with external logs.

I can't find any examples of someone doing this. My only solution is to get a script together that strips out any line in /var/log/syslog with 10.0.0.1 in it and puts the line into /var/log/tomato and have the script run as a cron job, but that seems unnecessarily messy.

Unless someone knows that there is a solution, I'm 95% sure that syslog doesn't support this after reading more in-depth of the man page. So I need to migrate to syslog-ng or make a crazy script that runs with cron.

View 3 Replies View Related

Ubuntu :: Bash - Putting String In File?

May 28, 2011

OK I have a simple script that does:

Code:
# Create temporary file:
pwFile="~/Tmp/temp.cnf"
echo "$password" > "$pwFile"

But I get an error message:

Code:
~/Tmp/temp.cnf: No such file or directory

View 3 Replies View Related

General :: Putting Function Key Chars In A File?

Sep 18, 2010

Years ago on AIX I used to create a file of key strokes, including function keys (mainly F3 and F12) into a file, and used that file as input to an INFORMIX program, to automated tasks, something like this:
fglgo myprogram.fgo <keystrokefile.txt

Now, I'm using Aubit language on GNU/Linux, and I'd like to do the same kind of thing, but I can't recall how I worked out the chars for the function keys, I'm using a different emulation (xterm), and I can't work out what characters to put in the key stroke file. My $TERM variable contains "xterm". If I type "infocmp", I get this:

Code:
# Reconstructed via infocmp from file: /usr/share/terminfo/x/xterm
xterm|xterm terminal emulator (X Window System),
am, bce, km, mc5i, mir, msgr, npc, xenl,
colors#8, cols#80, it#8, lines#24, pairs#64,
acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,

[Code]....

1. Is the above infocmp output the place I should get the information I need?

2. What chars do I need to put into my file to simulate me pressing F3 and F12?

3. Is there a way for me to put such chars in a file by just pressing those function keys (I tried a here document, but that doesn't work (it's as if the function keys are not even pressed)).

View 5 Replies View Related

General :: Script After Putting The File In Bashrc?

Oct 23, 2010

I have a problem with my script. The problem is the system keeps rebooting after I put the directory file in .bashrc. The intentional for putting the file in .bashrc is to run the script automatically after login as root, I don know why is this happen. It was working fine for the first time without putting the file in bashrc. I could break the loop after hitting the "ESC" key. would it be the script problems?

Here is my script
count=20
while [ $count -gt 0 ];do
sleep 1
echo Press ESC to break the operation
((count=count-1))

[Code]...

View 11 Replies View Related

OpenSUSE Hardware :: Create A Seperate X Server On 11.2 Without Editing The Xorg.conf File?

Apr 24, 2010

Is there a way to create a Seperate X Server on openSUSE 11.2 without editing the xorg.conf file? I red on this forum that should not be used any longer.

View 3 Replies View Related

Fedora :: Putting Kickstart File Onto USB Flash Drive

Dec 1, 2009

Here is a way to prepare a USB flash drive to save your kickstart file to it, and then read the kickstart file from the USB drive during a new Fedora installation.A USB flash drive is recognised by the Linux kernel as just another hard drive.This is how I set up my USB flash drive to use it to store my kickstart file on.You will need a working Linux system to set up the USB drive.

View 2 Replies View Related

Ubuntu Servers :: Desktop 10.04 Home Server- Editing Httpd.conf File - Fails

Jul 8, 2010

I turned my home PC running Ubuntu 10.04 into a server, and so i am so lost, after reading like a 10-20 different guides and/or official docs, I am totally lost.

All I wanted was to create a custom 404 error page...i read about how people edited .htaccess files to customize error pages, i tried and failed also, editing apache2.conf, I got lost and i dont wanna mess up everything and also, how you're supposed to not touch either of those as its not how it should be done and instead you need to edit httpd.conf and i did and FAILED! again...

Also how do I make it so that I can make subdomain(s) on my site? and wth is a name server and where do I get one?

View 4 Replies View Related

Server :: Putting MTA On A RAM Disk

Sep 14, 2010

Can any one tell me how to put the MTA on a RAM disk for faster sending of mails..

View 1 Replies View Related

Server :: Change The Configuration In Httpd.conf File With Out Affect Current Status Of Http Service?

Jan 27, 2011

I need to change the some configuration in httpd.conf file with out affect any current status of http service.

View 3 Replies View Related

Ubuntu :: Set Up An Alias For Update, Upgrade And Clean By Putting Line Into .bach.rc File?

Aug 3, 2010

I tried to set up an alias for update, upgrade and clean by putting this line into my .bach.rc file

Code:
#alias ud= 'aptitude update && sudo aptitude upgrade && sudo aptitude dist-upgrade && sudo aptitude autoclean' but when I type ud I get this error message, by the way I tried the bash.rc entry both commented and uncommented with the same result.

[Code]..

View 4 Replies View Related

Software :: Putting Drdflash.img Flash Utility And Bios File Onto A Bootable Floppy?

Mar 24, 2009

I'm looking for a way to make a bootable floppy that has drdflash.img, my flash utility and my bios file on it for a bios recovery disk. This is on a board that has a failed bios, so everything is pretty much dead (except for the humble floppy drive). I don't have a screen to work with so this floppy needs to be able to run the utility and automatically flash the chip for me. I've heard this is possible, but am unable to find clear instructions on how to do any of this. I know the basics of it is to copy the bios file and flash utility to a floppy along with a bootdisk that will run these things (sometimes the .bat file needs to be modified in order to do this automatically). So I've downloaded drdflash but it came as a .img and I don't think it can be 'just' copied to disk. I came across the 'dd' command but have also heard its nicknamed 'data destroyer' or words to that effect.

View 4 Replies View Related

Ubuntu :: Create A Backup Of The Xorg.conf File - Cannot Stat /etc/X11/xorg.conf

Dec 11, 2010

I've just done a fresh install of Lubuntu 10.10 on an older Sony Vaio laptop. Having learned the hard way about editing xorg files, I wanted to create a backup of the xorg.conf file so that I dont have to do another install when I screw everything up. In a terminal, I typed

[Code]....

View 8 Replies View Related

Programming :: Reading In A Outside Text File And Putting In The String On That Line Into A Char Array That Is Already Allocated?

Mar 29, 2011

Here is the issue. I am reading in a outside text file and putting in the string on that line into a char array that is already allocated.

Code:
int main(int argc, char *argv[])
{

[code]....

View 1 Replies View Related

CentOS 5 :: Httpd: Could Not Open Configuration File /etc/httpd/conf/httpd.conf: No Such File

Nov 9, 2009

accidentally I do something wrong with my server and the httpd folder missing and I need it to setup my mail server and anyone can help me what can I do without reinstalling my Cent OS? Here is the error msg :

[root@mydomain etc]# service httpd stop
Stopping httpd: [FAILED]
[root@mydomain etc]# service httpd restart

[code]....

View 3 Replies View Related

Programming :: C - For System Calls, Is Blocking Or Non-blocking Default?

Mar 23, 2010

For system calls, is blocking or non-blocking default in C? Simple question, just am not seeing the answer super quickly.

View 4 Replies View Related

Server :: /etc/named.conf:57: Open: /etc/named.root.hints: File Not Found

Apr 1, 2011

I am using Cent OS 5.5 and i want configure DNS, but while configuring bind i am getting below error.

#/etc/init.d/named restart Stopping named: [ OK ]
Starting named:
Error in named configuration:
/etc/named.conf:57: open: /etc/named.root.hints: file not found[FAILED]

View 2 Replies View Related

CentOS 5 Server :: Hosts File And Resolv.conf Conflict CentOS 5.5?

Apr 11, 2011

I am running an application that requires use of my /etc/hosts file. In it, I have my machine name and its LAN ip address. The program creates a service on a specific port, then attempts to connect to it based on the host name. So my hosts file has to be correct.I added the nameservers to resolv.conf and now my application will not run. My guess is that the computer is checking the name servers first, timing out then checking the hosts file.Is there a way I can tell the system to check the hosts file first, then DNS. I thought it should behave that way by default, but it does not appear to.

View 1 Replies View Related

Programming :: Blocking And Non Blocking TCP Send/recv?

Dec 25, 2010

I have a device that is working on modbus protocol andI have written a small program(with block TCP read method ) to read its registers via modbus protocol.my program is working very well but except those times that I unplug the Ethernet cable or turning off the modbus gateway during programs work.at this time my program stops on recv system call (if it reach this system call exacly when I unplug Ethernet cable or turning off the modbus gateway during programs work).I changed my source to work in nonblock TCP method, at this time with the same situation my program does not stop/block on recv system call but after pluging back the Ethernet cable or resuming the connectivity situation back it reads data incorrectly .this is my code:Quote:

#define DEBUG
#include <fcntl.h>
#include <string.h>

[code]...

View 5 Replies View Related

Server :: SquidGuard: Include Some Config File In SquidGuard.conf?

May 28, 2010

All i'd like to split my squidGuard.conf into 3 differents config files. The idea is that, I want 1 config file for src definition (my users), 1 config file for dest definition and 1 file for acl definition. And all of these files will be include in squidGuard.conf.

View 1 Replies View Related

Debian :: Cups Not Starting With The Server / Getting Error Unable To Read Configuration File '/etc/cups/cupsd.conf' - Exiting?

Feb 24, 2011

cups does not start with the server. When I try to start from the terminal I get the error message

cupsd: Unable to read configuration file '/etc/cups/cupsd.conf' - exiting!
cupsd: Child exited with status 1!

The log files show nothing. cupsd.conf exists. It is user - root and group - root with permissions set at 0644.

My interpretation of this is that the program is not launching from either boot or terminal for a fundamental reason. I do not quite see what that reason is .

View 2 Replies View Related

Fedora Security :: SEL Is Blocking Xauthority File?

Aug 8, 2011

since I upgraded to F15 I noticed that "su -l" is very slow, it takes about 20sec before it gives the prompt. I traced it down to a problem with "xauth" as su asks for the authorization for the display running "xauth nlist :0" which times out with an error. Actually, the command "xauth nlist :0" by itself gives:
xauth: timeout in locking authority file /home/user/.kde/tmp-host.domain/xauth-200-_0

If I put SELinux in permissive mode both command work without problem so I suppose SEL is the problem. I checked the permissions and settings of the file which is "unconfined_u:object_r:config_home_t:s0" but I have no idea if this is the right value, running "restorecon" on the file, directory or the whole /home/user didn't change anything.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved