?
Solved

Can not find interfaces file on centos 5.5

Posted on 2010-09-03
6
Medium Priority
?
860 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
Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

 
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 2000 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

Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

Question has a verified solution.

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

The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month14 days, 12 hours left to enroll

771 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