Solved

Can not find interfaces file on centos 5.5

Posted on 2010-09-03
6
858 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 11

Expert Comment

by:elbereth21
ID: 33595087
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 88

Expert Comment

by:rindi
ID: 33595161
What distro are you using?
0
 
LVL 19

Expert Comment

by:jools
ID: 33595173
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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 31

Expert Comment

by:farzanj
ID: 33606441
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
ID: 33685346
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
ID: 33877223
Solves qeustion
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

749 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