Solved

Unable ot masqerade through 2 ethernet interface

Posted on 1998-10-10
3
213 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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.

706 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now