LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How To Route Different Ip Class (https://www.linuxquestions.org/questions/linux-networking-3/how-to-route-different-ip-class-308854/)

hariiyer 04-02-2005 01:08 AM

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

Nathanael 04-02-2005 03:04 AM

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

hariiyer 04-02-2005 03:51 AM

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

Nathanael 04-02-2005 05:49 AM

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 :-)


All times are GMT -5. The time now is 01:48 PM.