Solved

Can not find interfaces file on centos 5.5

Posted on 2010-09-03
6
853 Views
Last Modified: 2012-06-22
Hi,

I am following the tutorial at http://cloudservers.rackspacecloud.com/index.php/Basic_Cloud_Server_Security

and am trying to set up the iptables

#Now we need to ensure that the iptables rules are applied when we reboot the server. At the moment, the changes will be lost and it will go back to allowing everything from everywhere.

#Open the file /etc/network/interfaces:

nano /etc/network/interfaces

#Add a single line (shown below) just after 'iface lo inet loopback':

...
auto lo
iface lo inet loopback
pre-up iptables-restore < /etc/iptables.up.rules

# The primary network interface
...

Open in new window


However, I can't find the interfaces file?

I've done a locate and it doesn't seem to be there. Is there another file I can put this line of code?

Thanks,

Julian
0
Comment
Question by:DrZork101
6 Comments
 
LVL 11

Expert Comment

by:elbereth21
Comment Utility
Under /etc/sysconfig/network-scripts/ you'll find a file for each interface ifcfg-*
This is the equivalent for CentOS, although I am not sure of the syntax you should use inside those files, to achieve what you are trying to.
0
 
LVL 87

Expert Comment

by:rindi
Comment Utility
What distro are you using?
0
 
LVL 19

Expert Comment

by:jools
Comment Utility
Hi

They look like generic notes, may be related to something else and it says at the top of the file you need to refer to your OS notes.

There are many tutorials on the net;
http://www.frozentux.net/iptables-tutorial/iptables-tutorial.html
http://www.linuxreport.org/content/view/26/23/

If you want you can use the RH default rules by running system-config-securitylevel from the GUI.
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 31

Expert Comment

by:farzanj
Comment Utility
You can use one of the following commands to find your interfaces files:

If you have locate on your system do the following

locate eth
locate ifcfg

if you don't get any output, do this
updatedb

and then run the above commands.

If however your system doesn't have this command try the following
find /etc -name *eth*

Hope it helps
0
 
LVL 31

Accepted Solution

by:
farzanj earned 500 total points
Comment Utility
On CentOS5.5 interface files are in the following directory:
/etc/sysconfig/network-scripts

The files are named ifcfg-eth0, ifcfg-eth1, etc.
0
 

Author Closing Comment

by:DrZork101
Comment Utility
Solves qeustion
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now