Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a box with two wired network interfaces. On Centos 5 I could run the setup command in console and set which interface is trusted and which not in the firewall configuration (e.g. eth1 trusted, eth0 - not). A few hours ago I have installed Centos 6 instead 5. When I go to the same Firewall Configuration through the setup command, the configuration interface is a bit different and I can not set the 'trust' per interface. There is just eth+ (which I think sets both the interfaces as trusted).

So my question is: how do I set which interface is trusted and which not on Centos 6?

Thanks in advance!


Based on quanta's suggestion I entered the two commands in the console but it didn't help. Then I tried to service iptables save and service iptables restart with no changes too.

Then I did the following:

I created a file /etc/sysconfig/iptables_eth1_trusted with the folowing content (eth1 is my LAN interface, and yes, when I tried quanta's commands in console I also used eth1):

-A INPUT -i eth1 -j ACCEPT
-A OUTPUT -o eth1 -j ACCEPT

Then I launched setup in console and in the 'Firewall configuration' I went to 'Custom Rules' and added the following rule:

Protocol Type: ipv4
Firewall Table: filter
File: /etc/sysconfig/iptables_eth1_trusted

I saved it and it worked as I wanted to.

I am quite new to linux and my iptables knowledge is very poor, so thanks to quanta for the rules, they were correct.

share|improve this question
up vote 0 down vote accepted

Selecting a device as trusted means all traffic over this device is allowed. So, try this:

iptables -A INPUT -i eth0 -j ACCEPT
iptables -A OUTPUT -o eth0 -j ACCEPT
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.