LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-22-2006, 03:54 AM   #1
deepak rawat
Member
 
Registered: Apr 2006
Posts: 37

Rep: Reputation: 15
how to share internet with two diff class ip's


i hav one linux box connected to broadband havings ip's on eth0

ip - 172.31.1.138
netmask - 255.255.255.0
dns - 172.31.1.1
gateway-172.31.1.1


and on eth1 ip is 192.168.0.1
netmask 255.255.255.0
dns 172.31.1.1
gateway 172.31.1.1

eth1 is connected to local network through a switch or hub

client pc are having windows and linux installed in them coonected to the internet linux box through switch/hub.




i want to share the internet on all this pc's but be sure i am nt interested in squid proxy or any other proxies


i think it was donw through iptables masquerading and if not then plz also let me nw where exactly the iptable masquerading and nat works
 
Old 04-22-2006, 09:34 AM   #2
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
Each box where the ip classes change between input and output NICs needs NAT.

You need static NAT as the ip numbers don't change, so use SNAT.

I suggest you have a good look at this iptables tutorial.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux to Win share; diff. subnet; thru firewall - not quite there KDoc Linux - Networking 0 08-10-2005 01:59 AM
Two Ip's on one internet connection bugstein Linux - Networking 1 03-18-2005 06:33 AM
how to share /home between diff distros? letdoit Linux - Newbie 2 05-20-2004 07:30 AM
routes, default gateways, ip's internet connecting - Much Stress mudelf Linux - Networking 2 09-29-2003 06:13 PM
class c subnet ip's acid_kewpie General 1 03-12-2002 06:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration