LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-02-2005, 01:08 AM   #1
hariiyer
Member
 
Registered: May 2004
Location: india
Posts: 103

Rep: Reputation: 15
How To Route Different Ip Class


Dear all,

My distro is RH9 with firestarter firewall. My internal ip is 192.168.1.1 and other is 10.10.10.1

My client pc adress is 10.10.10.2. and 192.168.1.2.

The problem is that only 192.168.1.2 is getting the internet connection . I don't have any router. But according to me linux server will act as router. Help me how to configure?

regards
hari
 
Old 04-02-2005, 03:04 AM   #2
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 33
how about posting your routing table (of both of you pc's)
that could be a helpful move.
also do you run 2 physically seperate networks, are you multihoming your computers? 2 seperate net-catds in both pc's on the same physical network?

thx
 
Old 04-02-2005, 03:51 AM   #3
hariiyer
Member
 
Registered: May 2004
Location: india
Posts: 103

Original Poster
Rep: Reputation: 15
Both r in the same network.

The structure is like that

In my linux i am using 2 nic cards. One is for external (internet) another is for local.

My windows pc is having in class a and class c. How do i spcify scripts in iptables for routing both classess.

regarda
hari
 
Old 04-02-2005, 05:49 AM   #4
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 33
iptables does not do the routing - of course you can tell iptables what to do with packets which are not destind for the firewall / router itself (FORWARDING chain) and you can restrict ports, devices... ladida!
iptables is for firewalling, restricting access!
what you need for routing to work is:
1. routing table needs to be defined correctly (hence i asked for your routing tables) not only on the server - but also on the workstation:
you need the route for both your networks, and you need the default route too
in linux type 'route' on windows run 'route print'
2. on linux pc's you will need the file /proc/sys/net/ipv4/ip_forward to have the content '1'
run this command:
# echo 1 > /proc/sys/net/ipv4/ip_forward
3. if you have iptables set up alreaddy either flush the FORWARD chain, and dont forget to set the chain policy to ACCEPT
or
add rules to allow traffic from the network card
please note that these rules will not do any packet filtering (they simply allow everything!)
#iptables -I FORWARD 1 -m state --state ESTABLISHED,RELATED
#iptables -I FORWARD 2 -i eth1 -j ACCEPT
#iptables -I FORWARD 3 -o eth1 -j ACCEPT

if you are looking for iptables tutorial, try googleing for 'iptables tutorial' or goto
http://iptables-tutorial.frozentux.n...-tutorial.html
that will actually be all you need to know about iptables :-)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
I am not able to add a new route to my route table using route command prashanth s j Linux - Networking 2 09-03-2005 04:34 AM
Implementing a vector class from a list class purefan Programming 9 04-14-2005 10:48 PM
BlackBox.class & VerifierBug.class virus ??? dalek Linux - Security 4 02-29-2004 08:55 AM
Inheriting class members (Qt C++, QApplication class) jtshaw Programming 2 01-15-2004 11:52 AM
c++ : regarding (inheritence)base class and derived class edreddy Programming 6 07-31-2002 06:33 PM

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

All times are GMT -5. The time now is 09:59 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