top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Restarting network interface in Linux Centos

+3 votes
557 views

I googled to see how I might restart the network interface in CentOS. I initially tried before googling:

sudo service network restart

I noticed that only the loopback interface was restarted. To confirm this I did:

service network stop

and then did

ifconfig

and the loopback info was gone. I then found ifconfig eth0 up/down and tried those and that did what I is was looking for. Why doesn't "service network restart" restart all interfaces?

posted Nov 21, 2013 by Deepak Dasgupta

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

The most likely answer is that your interface is not enabled. Try someting like

cat /etc/sysconfig/network-scripts/ifcfg-em1

You will see for a disabled interface ONBOOT="no". Change the no to a yes and you should be ok.

answer Nov 21, 2013 by Satish Mishra
Similar Questions
+2 votes

I am used to traditional update-rc.d et all.

Now I wonder how to add a a script that used to called by init.d (with start/sop ..) to the new "service start xx" regime.

All the tutorials I found talk about how to use update-rc.d..

+1 vote

I've been asked to give someone sudo rights across an entire environment without the benefit of something like puppet or chef or cfengine et al.

What I've come up with so far is this:

ssh -t miaprbicsra04v sudo -S /bin/echo "rsherman ALL=(ALL) NOPASSWD: /sbin/service /bin/rm /usr/bin/du /bin/df" >> sudo tee /etc/sudoers

Right now that's just to one host, but I plan on substituting a list of hosts once I get farther along. Problem is, the output hangs on the tee command. Not sure why. Any suggestions?

+2 votes

I'm planning to use CentOS 6.x on a handful of LAN servers. So far I've been using Slackware64 14.0 and 14.1 for the job.

I wonder what's the orthodox/recommended way of configuring and iptables firewall with CentOS. I understand there's the system-config-securitylevel-tui NCurses interface which allows defining a basic set of rules. But what about the handful of more advanced rules I have to configure?

Here's an example of an /etc/rc.d/rc.firewall script that I might use with Slackware. It contains mostly basic rules, and a couple of more advanced rules, one to limit SSH access, the other one to redirect HTTP traffic to Squid.

If I want to copy my actual firewall configuration to CentOS, what would be the recommended way? I started from a bare bones minimal CentOS 6.5 installation, so system-config-securitylevel-tui is not even installed.
Is it a good idea to try to configure /etc/sysconfig/iptables by hand? What do you suggest?

+6 votes

Noticing multiple threads named "ImageDecoder" showing up in the output of top (when threads are turned on with "H").

Can someone tell me what it is?

+4 votes

How to install "Latex2man" (Rpm file) in CentOs?
And what are other dependencies need to be installed with it?

...