Solved

Can not find interfaces file on centos 5.5

Posted on 2010-09-03
6
856 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
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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
​Being a Managed Services Provider (MSP) has presented you  with challenges in the past— and by meeting those challenges you’ve reaped the rewards of success.  In 2014, challenges and rewards remain; but as the Internet and business environment evol…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

895 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

17 Experts available now in Live!

Get 1:1 Help Now