Solved

Unable ot masqerade through 2 ethernet interface

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

623 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