We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now


Ipfwadm problem

root2 asked
Medium Priority
Last Modified: 2010-03-18
Here is the setup
NETWORK (.2-.254)  NIC          NIC            INTERNET
                   ETH0         ETH1            EXTERNAL        
  I messed around with the routing files and still have not been able to get the firewall to work properly.
Note--Everything was done from the firewall itself

  Without even touching the routing tables, I can successfully ping eth0 but not eth1.  I can also telnet out to the internet (external stuff)
  the routing table looks like this:
Destination   GW     Genmask    Flags MSS  Window Use Iface   *   U 1500   0   36 eth0       *       U 3584   0    2 lo
default   *       UG 1500   0  143 eth0
when I do route add -net eth1

Destination  Gateway  Genmask  Flags MSS  Window Use Iface   * U  1500   0    36 eth1   * U  1500   0    36 eth0       *     U  3584   0     2 lo
default   *      UG  1500   0   143 eth0

 I can now successfully ping eth1 ( but not eth0 (  I can still telnet out to the rest of the world which is connected to eth0.
  Am I missing something in the routing table?
  Is it because I am using and .2 for the two nics?  do I have
  to use separate?
  I haven't set up any rules for ipfwadm yet.  Is that the problem?
  Do I need to set up forwarding rules in order for it to work?
  Any help would be greatly appreciated!
Watch Question

The problem is that you have both NICs set up on the same sub-net.

What are you trying to acheive ?
Why do you have two NICs ?

If you have the firewall between two ethernets, then those machines must have two different IP address spaces.

(You can use 192.168.x.x for the private address space if
you use Masquerading on the linux firewall)

You realy need to do a diagram of your network topology for
anybody to understand this.

(Also you should have a lot more points for the question)

You have missed a few important points.

Firstly, your IP addressing is wrong. You have three networks to consider here. The Internet is one, but you can rest assured that that is configured right :-). So, you are left with two logical networks, a small one connecting the NIC with address to the internal interface of your router. Your other network connects the NIC with address to the rest of the hosts on your network.

It is important for you to realise that your firewall is, itself a router. Ergo, you *must* recompile it's kernel, and enable IP forwarding. Without this, nothing will work. Second, you need to subnet your class C address properly. Assuming you have a full class C address, you need to split this. As you have very few interfaces (i.e. 2) on the 'external' side of the firewall, you want to use the smallest amount of your address space for subnetting. This is 1 bit. So, you end up with two subnets, like so:-

Network Address    Broadcast Address   Valid Host addresses
---------------    -----------------   -------------------- - .126 - .254

Then assign addresses from one subnet to all your hosts, and
change their subnet masks to, and addresses from the other subnet to your router's internal interface, and the 'router facing' interface on your firewall machine. You also need to change the subnet addresses on these two bits of kit.

Then, if the router facing NIC on the firewall is eth1, you need to set the default gateway on the firewall to be the IP address of the router (, and the gateway device to eth1. You can find this in /etc/sysconfig/network

All your other hosts must be configured with the IP address of the eth0 interface as their default gateway.

When you've done all that, your routing should be up and running. Then, you can start to mess around with firewall rules.

You might also consider upping the points value on this question.....

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.