ADSL Internet Sharing

Erik Nørgaard norgaard at locolomo.org
Sun Jul 16 14:27:47 UTC 2006


andreas Sotirakopoulos wrote:
> Hi,
> I have some problems sharing my adsl internet connection
> between my FreeBSD 6.0 Box (server) and my Ubuntu 6.0.6
> box (client). I use a crossover cable to connect the two PCs and
> on the FreeBSD PC I have an onboard network card (fxp0) and 
> an wireless card (ural0) and on my Ubuntu box I have one NIC (eth0).
> 	
> My goal is to have my internet connection shared. The router I use
> to have internet access from my BSD box is downstairs so I connect to the 
> internet via my wireless card.
> 
> The ip address of the router is 192.168.1.1 and of my fxp0 interface
> 192.168.0.1. Of my eth0 is 192.168.0.2. I have set on Ubuntu as gateway
> 192.168.0.1 (my BSD box's address).

Netmask? Always indicate your ip-address as <IP-address>/<CIDR>.

> Also i can ping the two pc from each other, but from ubuntu i cannot ping
> the router or any internet address. I have the following to my /etc/rc.conf
> 
> gateway_enable="YES"
> firewall_enable="YES"
> firewall_type="OPEN"
> natd_enable="YES"
> natd_interface="fxp0"
> natd_flags=""
> 
> and the option described on the Handbook compiled in the Kernel. What 
> i missing?

I don't know anything about ipfw, or natd, I assume you checked that?

Two things to do:

* Check your firewall log, if no logging is done, add log rules to see
where packets are caught.

* Try sniffing on the interfaces on the BSD box with tcpdump or snort.

Is the DSL smart enough to figure out to return the icmp? Maybe it
doesn't guess that a reply should go out on the same interface as the
request was received:

The dsl does likely not know about your network between your two
machines, so instead of returning the ping on the wireless interface
that received the ping it is sent off to the default gateway which goes
to the internet.

If that is the case you must add routing to your 192.168.0.0/24 network
on the DSL.

Cheers, Erik

-- 
Ph: +34.666334818                      web: http://www.locolomo.org
X.509 Certificate: http://www.locolomo.org/crt/8D03551FFCE04F0C.crt
Key ID: 69:79:B8:2C:E3:8F:E7:BE:5D:C3:C3:B1:74:62:B8:3F:9F:1F:69:B9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4128 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20060716/d5617f01/smime.bin


More information about the freebsd-questions mailing list