[x] Welcome to LinuxSolved.com Linux help forums, here we are a community of Linux users helping each other. It is helpful to both ie. new linux users as well experienced one. We always have our experts to help you and ofcourse members help each other, so you can ask for help any time by Registering.: Click to Register

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Linux Forums - Linux Help,Advice & support community:LinuxSolved.com  |  Forum  |  Network Troublshooting  |  General Networking Support in Linux  |  Topic: IPtable and Internet sharing REDHAT LINUX 9.0
The LinuxSolved.com GNU/Linux User Communit - Forum
Welcome to LinuxCommunity You have just arrived to a friendly linux community which is helping Linux Users from Years.. You can be its part if you have not already joined it. Registration is FREE and is gateway to unlimited help and support to all your linux related needs. If you are an GNU/Linux supporter then you have come to the right place.
Pages: [1]
  Print  
Author Topic: IPtable and Internet sharing REDHAT LINUX 9.0  (Read 4113 times)
0 Members and 1 Guest are viewing this topic.
sathish
Linux Learner
***
Offline Offline

Posts: 73


View Profile
« on: November 27, 2003, 04:21:46 PM »

Hello Sir,

In my office i am having WAN link, my ISP provider has provided 12 IP address. I want to use this 12 ip addres in IP table (it should work in roundrobin system in the NAT table).

1) eth0 -  is the ISP provider link
2) eth1 - is the our private LAN link.

and also
I want to share the internet to the private LAN link.

Thank you.
Sathish Smiley
Logged
narsingh
Linux Noob !
*
Offline Offline

Posts: 13


View Profile
« Reply #1 on: November 27, 2003, 11:20:55 PM »

Any problem in using Squid proxy server for the purpose?
Logged
Ricky
LST CareTaker
Specially Skilled
*****
Offline Offline

Gender: Male
Posts: 2205


View Profile
« Reply #2 on: November 27, 2003, 11:34:47 PM »

Satish... If u need to share internet from linux box to other clients by Iptables.. then run following script..
Code:
#!/bin/sh

iptables=/sbin/iptables



$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
Execute the above script.. and u will be able to share internet from your linux box. In your clients, give the ip of your linux box as the gateway.
Please give litle more detail that wht do u want to do.. i.e. roundrobin system..
Logged
MiG-15
Linux Noob !
*
Offline Offline

Posts: 8


View Profile
« Reply #3 on: December 02, 2003, 02:35:33 AM »

how many users do you have in your office setup, i use the same sort of setup for my home but i only have one ip and about a dosen computers on the lan via dhcp.  the script  Ricky posted should work nicely..  and dhcp is easy to setup...  lol with webmin(!)
Logged
wajeh786
New Member

Offline Offline

Posts: 1


View Profile
« Reply #4 on: December 02, 2003, 03:01:58 AM »

hi dears
 
  i can share the internet with the squid through my linux box but i must give the proxy server address to each client's web browere which i donot want to each time cuz i have more than 50 clients in my lan  and also i can not use the  mail,ftp etc clients on my windows machines.
 

  one more thing is that my network configurations are:

i have one network card with two ips one is lan and other is real
 
eth0 is for local ip
and eth0:1 is for real ip

can any body help me in configuing the transparent proxy
regards
 wajeh
Logged
Ricky
LST CareTaker
Specially Skilled
*****
Offline Offline

Gender: Male
Posts: 2205


View Profile
« Reply #5 on: December 02, 2003, 04:00:19 AM »

Well! you have to create a script and execute that.. then u will not need to configure each client..
Script is at
http://www.linuxsolved.com/forums/viewtopic.php?p=298#298
Logged
manoj
New Member

Offline Offline

Posts: 1


View Profile
« Reply #6 on: March 08, 2004, 05:39:21 AM »

Hi Sathish,
An elegant way (which I use) would be to put all your client in DHCP mode and configure your dual-homed host as an DHCP server. Then you do not have to assign gateway etc to each individual client on the network.
Along with this, you need to configure your iptables as pointed out by Ricky.
This should solve your problem of internet sharing.
Logged
Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
   

 Logged
Pages: [1]
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Internet Sharing in Linux / NAT How to Linux Tutorials & How To's « 1 2 3 » Ricky 42 41422 Last post December 05, 2006, 09:31:44 PM
by dedi
Internet sharing between linux pc and win98se pc General Networking Support in Linux sekhar_vrc 2 1111 Last post August 03, 2004, 09:57:27 PM
by sekhar_vrc
Internet Sharing in LINUX Linux Servers Support rizwankhan 1 823 Last post April 02, 2005, 02:31:15 PM
by Ricky
sharing internet from linux machine ? General Networking Support in Linux joydeep 6 869 Last post January 17, 2007, 07:19:19 AM
by Ricky
iptable rule to share internet General Networking Support in Linux selvamanojpraveen 1 372 Last post January 29, 2008, 03:06:12 AM
by Ricky
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 20, 2008, 06:58:26 PM

Login with username, password and session length
Navigation
Recent Discussions
[November 19, 2008, 07:52:49 PM]

[November 19, 2008, 07:52:41 PM]

[November 19, 2008, 07:52:36 PM]

[November 17, 2008, 10:42:59 AM]

[November 16, 2008, 12:49:47 AM]

[November 16, 2008, 12:48:58 AM]

[November 15, 2008, 08:29:02 AM]

[November 15, 2008, 08:24:41 AM]

[November 14, 2008, 05:11:50 AM]

[November 13, 2008, 03:28:22 AM]
Members
Total Members: 6220
Latest: ahsanjee
Stats
Total Posts: 8268
Total Topics: 2253
Online Today: 13
Online Ever: 111
(June 28, 2007, 06:47:29 AM)
Users Online
Users: 0
Guests: 13
Total: 13
Privacy Policy| Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks
Theme & TinyPortal v0.9.8 © Bloc