Solved

Unable ot masqerade through 2 ethernet interface

Posted on 1998-10-10
3
215 Views
Last Modified: 2010-04-20
Hello,
I have a Linux box and want to set it up as a gateway.  There are two ethernet interfaces in the box.  The kernel had been compiled with the masquerade option. Also, I type in ipfwadm -F -a masquerade -W eth0 -S 10.0.0.0/9 -D 0.0.0.0/0 .  
However, I cannot use this Linux gateway and telnet or http to the Internet.  Can anybody tell me what else do I need to do ?
0
Comment
Question by:andrewma
3 Comments
 
LVL 1

Accepted Solution

by:
ghjm earned 50 total points
ID: 1638241
1. Make sure your clients are configured with the internal IP address of the Linux box as their default route, aka gateway.

2. Try "ipfwadm -F -p masq" and see if it works. If it does, then your policy (above) is too restrictive.
0
 

Expert Comment

by:tunct
ID: 1638242
My working configuration over ppp:
ipfwadm -F -a m -S 192.168.1.0/24 -D 0.0.0.0/0
This one uses a different address space - 192.168.1.xxx (10.0.0.xxx may not be suitable. Good to read a few articles on IP address assignment on the web.)

There is the routing table, too. What's your output from "route -n"? It should include your subnetworks (for me, 192.168.1.0), your interface to the outer world and default routes (eth0, lo). Routing entries are added using "route add", by the way.

Post your detailed configuration if that doesn't help.
0
 
LVL 2

Expert Comment

by:blowfish
ID: 1638243
Are both of your ethernet interfaces configured properly?  Is your subnet mask correctly specified?  The command;

  #  netstat -i

will show network statistics for each interface configured and running, you should see eth0 and eth1.  You should also try;

  #  ifconfig -au

this will show you IP address, netmask, and broadcast address for each interface configured and running, you should see eth0 and eth1.  

I notice that your ipfwadm command includes " -W eth0 -S 10.0.0.0/9".  Unless you made a typo in entering your question, what you have done is specify a 9-bit subnet mask.  You would probably be better off specifying the default 8-bit subnet mask.  Also, all of your workstations on network 10.0.0.0 will have to use 255.0.0.0 as their subnet mask.  

Are both of your network interfaces being configured.  If not you may need to modify your /etc/lilo.conf to include the following line; (I'm doing this from memory, might be incorrect)

  append ether="eth0,0,0,eth1,0,0"

Can the firewall ping addresses on both internal and external networks?  If it can, then have you turned on IP Forwarding (one of the FAQ's I read when setting mine up said that you may need to do this).  I use the following command in my firewall start script;

  echo "1" > /proc/sys/net/ipv4/ip_forward


--frankf
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

776 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