Skip to Content.
Sympa Menu

baslinux - Re: [BL] gateway between two laptops

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: baslinux AT lists.ibiblio.org
  • To: baslinux AT lists.ibiblio.org
  • Subject: Re: [BL] gateway between two laptops
  • Date: Sun, 24 Aug 2008 20:38:47

On 23 Aug 08 at 7:04, baslinux AT lists.ibiblio.org <baslinux AT lists.ibiblio.org>
wrote:

>Message from Steven
>===================
>Christof wrote:
>>
>> The router has been set up by my neighbour at
>> the 4th floor.
>
>Then I recommend you use ipchains on the GW
>machine (with the BL3 big kernel). That
>should enable the GW machine to masquerade
>the 198.168.1.2 address to 10.0.0.2. If you
>masquerade the address, no adjustments to the
>wireless router will be needed.

I tried to do the same on a different system (Slax based on
Slackware 12). I realized that I had iptables instead
of ipchains. I applied a script that I found in an Ubuntu forum.

After connecting the GW machine to the internet at eth1
I ran these commands:

ifconfig eth0 192.168.1.1

# allow forwarded packets (initial ones):
iptables -A FORWARD -i eth1 -o eth0 -s 192.168.1.0/24
-m state -- state NEW -j ACCEPT

# allow forwarding of established connection packets
iptables -A FORWARD -m state --state ESTABLISHED,RELATED
-j ACCEPT

# do the NAT
iptables -A POSTROUTING -t nat -j MASQUERADE

# IP forwarding:
echo 1 > /proc/sys/net/ipv4/ip_forward


No problem with writing to ip_forward on this system.
The client machine was set up with BL3 as discussed.

With this I could get internet access on the client machine.

I would, however, rather like to do it the other way around, i.e.
use the smaller machine as gateway with BasicLinux, and use my
Slax machine as client.

Question: would it be possible to use iptables in BasicLinux or
is it designed only for more recent Slackware installations?

Christof

________________________________________________________________

Ceskobratrska cirkev evangelicka - Betlemska kaple na Zizkove
Prokopova 4/216, 130 00 Praha 3, Czech Republic
Tel. (+420) 222 78 06 73 / 222 78 20 02 / 603 18 87 53
http://www.volny.cz/cce.zizkov





Archive powered by MHonArc 2.6.24.

Top of Page