Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Feb 2001 06:36:30 -0700
From:      "Robert Daniels" <rdaniels38@home.com>
To:        <freebsd-questions@FreeBSD.ORG>
Subject:   NATD&GATEWAY PROBLEMS 
Message-ID:  <009c01c09a78$f7833ca0$43701518@cx628451A>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
    Hello,  my name is Robert.  I am trying to configure my FreeBSD 4.0 as a gateway. I have a 3 computer network.  My  ISP is cox@home. (Cable Modem)

    Computer 1 name is FOO (will serve as gateway)
    Computer 2 name is BAR (Running Free BSD 4.0) 
    Computer 3 name is BAZ(Running Dual Boot Win2000 Professional & Red Hat Linux 7.0)

    I compiled IPFIREWALl, IPDIVERT, IPFIREWALL_VERBOSE, and IPFIREWALL_DEFAULT_TO_ACCEPT in my Kernel on computer FOO. 
    
    I put the following lines in my rc.conf file on computer FOO

    hostname="CX628451-A"
    ifconfig_dc0"inet 192.168.1.1 netmask 255.255.255.0"  # Private IP
    ifconfig_dc1"inet  24.21.112.xxx netmask 255.255.255.0"   # Public IP
    gateway_enable="YES"
    defaultrouter="24.21.112.1" # Gateway for my ISP. 
    natd_enable="YES"
    natd_interface="dc1"
    natd_flags"-l -u -s -m"
    firewall_enable="YES"
    firewall_type="OPEN" 


The rc.conf fie on BAR looks as follows.

   hostname="BAR"
    ifconfig_x10="inet 192.168.1.2 netmask 255.255.255.0" # Private non-routable IP
    defaultrouter="192.168.1.1"  
    gateway_enable"NO"

With this setup I am able to ping computer FOO from computer BAR. I am able to ping both private and public addresses. I am also able to ping FOO defaultrouter IP and DNS IP that I have set in resolv.conf. But I am unable to ping an address out on the internet on computer BAR. Of course I am able to ping address on the internet with computer FOO. I can telnet into Foo via BAR and vice versa.  I also verified that the line natd 8668/divert was present in /etc/services.  

Any help on this matter would be greatly apreciated. 


Thank You,
Robert Daniels    


    
     


    

[-- Attachment #2 --]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4611.1300" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; Hello, &nbsp;my name is 
Robert.&nbsp; I am trying to configure my FreeBSD 4.0 as a gateway. I have a 3 
computer network.&nbsp;&nbsp;My &nbsp;ISP is <A 
href="mailto:cox@home">cox@home</A>. (Cable Modem)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; Computer 1 name is FOO (will 
serve as gateway)</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; Computer 2 name is BAR (Running 
Free BSD 4.0)</FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; Computer 3 name is BAZ(Running 
Dual Boot Win2000 Professional &amp; Red Hat Linux 7.0)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; I compiled IPFIREWALl, IPDIVERT, 
IPFIREWALL_VERBOSE, and IPFIREWALL_DEFAULT_TO_ACCEPT in my Kernel on computer 
FOO. </FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; I put the following lines in my 
rc.conf file on computer FOO</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
hostname="CX628451-A"</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; ifconfig_dc0"inet 192.168.1.1 
netmask 255.255.255.0"&nbsp; # Private IP</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; ifconfig_dc1"inet&nbsp; 
24.21.112.xxx netmask 255.255.255.0"&nbsp; &nbsp;# Public IP</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
gateway_enable="YES"</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; defaultrouter="24.21.112.1" # 
Gateway for my ISP. </FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; natd_enable="YES"</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
natd_interface="dc1"</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; natd_flags"-l -u -s 
-m"</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
firewall_enable="YES"</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; firewall_type="OPEN" 
</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>The rc.conf fie on BAR looks as 
follows.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;hostname="BAR"</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; ifconfig_x10="inet 192.168.1.2 
netmask 255.255.255.0" # Private non-routable IP</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; defaultrouter="192.168.1.1" 
&nbsp;</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; gateway_enable"NO"</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>With this setup I am able to ping computer FOO from 
computer BAR. I am able to ping both private and public addresses. I am also 
able to ping FOO defaultrouter IP and DNS IP that I have set in 
resolv.conf.&nbsp;But I am unable to ping an address out on the internet on 
computer BAR. Of course I am able to ping address on the internet with computer 
FOO. I can telnet into&nbsp;Foo via BAR and vice versa.&nbsp; I 
also&nbsp;verified that&nbsp;the&nbsp;line natd 8668/divert was present in 
/etc/services.&nbsp;&nbsp;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Any help on this matter would be greatly 
apreciated.&nbsp;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Thank You,</FONT></DIV>
<DIV><FONT face=Arial size=2>Robert Daniels &nbsp;&nbsp; </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; </FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; </FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;</FONT></DIV></BODY></HTML>

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?009c01c09a78$f7833ca0$43701518>