Network Troublshooting > General Networking Support in Linux

sharing internet from linux machine ?

(1/2) > >>

joydeep:
Dear list,

I am in a critical network problem with a linux box and asking help from the group.
let me discuss the actual situation. I have a load balancong router called linksys RV042.
this router has 2 wan port. now there is a ADSL modem come from one  of my isp. I have set the modem as a auto dialer so powering up the modem automatically dial up the isp. one connection from this modem has come to one of the wan port of my linksys load balancing router. there is no problem to get the net connection

another isp is providing 24online connection where a lan card is required to dialup the isp.
I have a linux PC which have 2 lan card. so I dial up the isp using one lan card and getting the net connection in this linux pc. now I like to use the 2nd lan card of this pc to fed this
internet connection to the other free wan port of the load balancing router. and here is the actual problem I am facing. So could one kindly suggest how to use this 2nd lan card to fed the internet into the wan port of  the load balancing router

Ricky:
That is not a problem, I think your other ISP is some WIFI or oen which using authentication for using the internet !

I dont' have much idea about that linksys loadbalanced router but you can easily do that .

All you need to do is apply a method of internet sharing linux available among few..  
One I have mentioned is this oen -->
http://www.linuxsolved.com/forums/ftopic115.html

Its particularly doing port forwarding.. Just do that and then if allowed in your router, set gateway, DNS accordingly in the router (Gateway must be IP of eth1 or linux box and DNS as per provided by that ISP)

joydeep:
Thanks a lot for your response. the link which u have mentioned; I have tried last week but without any success. let me give u more details. may be u can suggest where I am doing wrong. first see my setting below

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

Ricky:

--- Code: ---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
--- End code ---

Here leaev gateway and DNS blank & let me know.

joydeep:
well Ricky,
I am using suse 10. For both the card it automatically take ( from yast) the same nameserver and GW. I have also tried to blank the GW ans nameserver of eth1 but then
found that it automatically clears the dns and GW from the configuration of eth0 too.

so here eth1 is automatically taking the same DNS and GW as eth0.

can u seggest to fix it ?

Navigation

[0] Message Index

[#] Next page

Go to full version