Internet Connection Sharing question

Internet Connection Sharing question

Post by blackst » Sun, 12 May 2002 01:56:15



Hi,

I have a Linux box that shares my Internet connection.  I would like
to try it with FreeBSD.  Here's the hardware setup:

PII 333, 128mb Ram
2 ethernet Nics (one for the cable modem: DHCP, the other one goes in
my hub)

With Linux I had to make a small script of 4 or 5 lines with ipchains.
 How can I do it with FreeBSD?  Security is not an issue for the
moment, I just want to know how to route packets from a nic to the
other (Masquerading...)

Thank you.

 
 
 

Internet Connection Sharing question

Post by jp » Sun, 12 May 2002 02:10:46



Quote:> I have a Linux box that shares my Internet connection.  I would like
> to try it with FreeBSD.  Here's the hardware setup:
[snip]
> With Linux I had to make a small script of 4 or 5 lines with ipchains.
>  How can I do it with FreeBSD?  Security is not an issue for the
> moment, I just want to know how to route packets from a nic to the
> other (Masquerading...)

It's only called masquerading in the linux world. Network Address
Translation (NAT) is in section 17.11 of the handbook (which you
need to read anyway):

  http://www.freebsd.org/handbook/index.html
  http://www.freebsd.org/handbook/natd.html

--
  j p d (at) d s b (dot) t u d e l f t (dot) n l .

 
 
 

Internet Connection Sharing question

Post by Berk S. Daemo » Sun, 12 May 2002 05:33:10



Quote:> Hi,

> I have a Linux box that shares my Internet connection.  I would like
> to try it with FreeBSD.  Here's the hardware setup:

> PII 333, 128mb Ram
> 2 ethernet Nics (one for the cable modem: DHCP, the other one goes in
> my hub)

> With Linux I had to make a small script of 4 or 5 lines with ipchains.
>  How can I do it with FreeBSD?  Security is not an issue for the
> moment, I just want to know how to route packets from a nic to the
> other (Masquerading...)

> Thank you.

Two choices, IPFW/natd and/or IPF/ipnat (IPfilter) Both are available
already on your system(s)

People already posted the how'to links for IPFW/natd so I won't be
redundant, but I recommend trying both and see what you like better.

www.ipfilter.net for the how-to, etc..

 
 
 

Internet Connection Sharing question

Post by Eric F Cris » Sun, 12 May 2002 09:37:51


Ok, first, I must say RTFM.  That said, here's a quick fix, and a rough idea
of what you should do:

In the /etc/rc.conf file, set the following variables:
natd_enable="YES"
natd_interface="you public interface (e.g. rl0, ed0, dc0, etc)"
gateway_enable="YES"
ifconfig_(inside interface)="inet private.ip.address.here"
ifconfig_(public interface)="DHCP, or however you obtain IP addy"

From there, you should be able to start all this with a /etc/netstart
command as root.  This will renew the public IP address, and set your
internal address and outside address.

I hope this helps.

--
Eric F Crist
President/Sys Admin
AdTech Integrated Systems, Inc.
http://www.adtechintegrated.com


Quote:> Hi,

> I have a Linux box that shares my Internet connection.  I would like
> to try it with FreeBSD.  Here's the hardware setup:

> PII 333, 128mb Ram
> 2 ethernet Nics (one for the cable modem: DHCP, the other one goes in
> my hub)

> With Linux I had to make a small script of 4 or 5 lines with ipchains.
>  How can I do it with FreeBSD?  Security is not an issue for the
> moment, I just want to know how to route packets from a nic to the
> other (Masquerading...)

> Thank you.

 
 
 

1. connect a linux machine to the internet via internet connection sharing

Hi,

Basically, tell your Linux box the IP address of a DNS server, and that it
should use the IP address of the Windows machine as its gateway.  What about
showing us the output of your /sbin/ifconfig and /sbin/route -n commands on
your Linux box.

See ya

Dean Thompson

--
+____________________________+____________________________________________+

| Bach. Computing (Hons)     | ICQ     - 45191180                         |
| PhD Student                | Office  - <Off-Campus>                     |
| School Comp.Sci & Soft.Eng | Phone   - +61 3 9903 2787 (Gen. Office)    |
| MONASH (Caulfield Campus)  | Fax     - +61 3 9903 1077                  |
| Melbourne, Australia       |                                            |
+----------------------------+--------------------------------------------+

2. r5 on iMac

3. Internet Connection via a Network Shared Connection in RedHat 7.2

4. FreeBSD Questions

5. internet connexion sharing through usb direct connexion

6. IDE ZIP drive gets Device not configured

7. Windows to Linux Internet Connection Sharing

8. is sendmsg() implemented in Linux??

9. how can I share an internet connection...

10. Solaris 7 and Windows 98 Internet Connection Sharing

11. Sharing internet connection with dialup ppp clients

12. Sharing Internet Connection DNS?

13. How to "Share" internet connection...