Solved

Unable ot masqerade through 2 ethernet interface

Posted on 1998-10-10
3
218 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
[X]
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
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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Suggested Solutions

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Fine Tune your automatic Updates for Ubuntu / Debian
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.

751 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