Ipfwadm problem

Posted on 1997-08-05
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!
Question by:root2
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

Expert Comment

ID: 1585851
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)


Accepted Solution

sauron earned 10 total points
ID: 1585852
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.....

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit If you want to manage em…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

733 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