Share internet connection/make a small server
Alexander Dalloz
ad+lists at uni-x.org
Tue Aug 30 13:44:31 UTC 2005
Am Di, den 30.08.2005 schrieb Antonio Olivares um 15:02:
> > Make sure you have forwarding set on on the gateway
> > host:
> >
> > $ cat /proc/sys/net/ipv4/ip_forward
> >
> > must print out "1" (without quotes). If it does not,
> > then activate it in
> > /etc/sysctl.conf and run "sysctl -p". Make too sure
> > the gateway does NAT
> > by an iptables rule like:
> >
> > iptables -A POSTROUTING -o eth0 -j MASQUERADE
> >
> > [eth0 should be in your case the outgoing device]
>
> eth0 is the incoming connection should eth1 be the
> outgoing. I'm a little confused but getting there.
The device given with -o <device> has to be the public net device.
> [root at rio ~]# cat /proc/sys/net/ipv4/ip_forward
> 1
Ok.
> [root at rio ~]# iptables -A POSTROUTING -o eth0 -j
> MASQUERADE
> iptables: No chain/target/match by that name
Sorry, my fault. Above should have been for the NAT table (by default
iptables takes the filter table):
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
> I have made most changes that Jeff and Alexander have
> provided and I know that I am close as possible to
> getting this thing going.
> I tried to connect to the internet from within Windows
> 98 machine and I get a DNS error and cannot connect.
The NATed client has to know a valid DNS server and it's gateway is the
NAT gateway host.
> However, the ipconfig /all, ipconfig /release_all and
> ipconfig /renew_all give the following
> Windows 98 IP Configuration
> 1 Ethernet adapter :
> Description . . . . . . . . : 3Com 3C90x Ethernet
> Adapter
>
> Physical Address. . . . . . : 00-C0-4F-73-25-42
>
> DHCP Enabled. . . . . . . . : Yes
>
> IP Address. . . . . . . . . : 192.168.100.200
>
> Subnet Mask . . . . . . . . : 255.255.255.0
>
> Default Gateway . . . . . . : 192.168.100.1
>
> DHCP Server . . . . . . . . : 192.168.100.1
>
> Primary WINS Server . . . . :
>
> Secondary WINS Server . . . :
>
> Lease Obtained. . . . . . . : 08 30 05 7:22:21 AM
>
> Lease Expires . . . . . . . : 08 31 05 7:22:21 AM
So eth1 on the Fedora machine is your inner (LAN) network device and
eth0 for NAT.
> It is probably something with the settings.
> Apparently everything looks ok but connection not
> good. Thanks for all suggestions and help provided.
Is the LAN client able to ping IP 10.154.19.136? Is it able to ping IP
64.233.183.99?
> Antonio
Alexander
--
Alexander Dalloz | Enger, Germany | GPG http://pgp.mit.edu 0xB366A773
legal statement: http://www.uni-x.org/legal.html
Fedora Core 2 GNU/Linux on Athlon with kernel 2.6.11-1.35_FC2smp
Serendipity 15:34:40 up 8 days, 12:18, load average: 0.08, 0.07, 0.08
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20050830/2f893a4b/attachment-0001.sig>
More information about the fedora-list
mailing list