[TAG] how to share internet from a linux server
j.bakshi@icmail.net
j.bakshi
Sat Jan 13 11:25:13 MSK 2007
----- Original Message Follows -----
From: Kapil Hari Paranjape <kapil at imsc.res.in>
To: TAG <tag at lists.linuxgazette.net>
To: j.bakshi at icmail.net, The Answer Gang
<tag at lists.linuxgazette.net>
Subject: Re: [TAG] how to share internet from a linux server
Date: Fri, 12 Jan 2007 06:46:33 -0800
> Hello,
>
> On Fri, 12 Jan 2007, j.bakshi at icmail.net wrote:
> > 3] I have a linksys RV042 load balancing router which
> > have 2 uplink port.
> > I have configured one uplink with ip 192.168.0.114
> > and mask 255.255.255.0
> > and connect this port with eth1
>
> What is a load balancing router doing *inside* the LAN? I
> think you should be using a HUB/switch. Here is a little
> diagram
>
> -----[ eth0: Linux nat box : eth1]----[ Hub/switch
> ]---[LAN]
>
> Is this not what you want? Perhaps I understood your
> question wrong.
may be this provide more clear view
isp 1--->[ eth0(used to dial isp1) linux eth1]---> [wan2
port of router] -----> [hub]--> client PCs
now here is the setting of eth1
-----------------------------------------------------
ip ---> 192.168.0.2
mask --> 255.255.255.0
gateway --> gateway of eth0
dns ----> dns of eth0
here is the setting of wan2 port of load balancing router
-------------------------------------------------------------------------------------------
ip ----> 192.168.0.114
mask ----> 255.255.255.0
gateway ----> 192.168.0.2 (ip of the linux lan card)
dns ------> 192.168.0.2
Here is the setting of the hub section of the router
---------------------------------------------------------------------------------
ip ----> 192.168.1.2
mask ---> 255.255.255.0
dual wan ----> wan1 wan2
wan1 and wan2 has their own setting as I also mentioned the
wan2 above.
clients pc settings
-----------------------------------
DHCP enable. bcoz the load balancing router has DHCP server
inbuilt
gateway ---> 192.168.1.2
here is the script I use in my suse 10
iptables --flush -t nat
iptables --table nat --append POSTROUTING --out-interface
eth0 -j MASQUERADE
iptables --append FORWARD --in-interface eth1 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
after executing the script I have tried from the clients pc
with out success.
Could any one kindly point out my mistake ?
please note I am getting the internet from the linux pc
which dialup isp1
>
> > Please suggest how can I solve the problem. pointing out
> > any tutorial is also welcome.
>
> Have a look at the howtos on the iptables site.
>
> Kapil.
> --
>
More information about the TAG
mailing list