PDA

View Full Version : Linux Newbie needs help


Pigs
16-01-2004, 10:24 PM
Hi people,
I have a good handle on Windows OS's however I really want to get more from my linux Pc's.

OK So here's the problem, Can someone suggest a solution or point me to specific info i can read. I've been looking but no answers specific to what I want to do.

Linux red hat 9
2 nics.
Internal 10.0.0.X
External 192.168.1.X
router 192.168.1.X

I have a dsl500 router pointing to a hub and my windows network hanging of it via 2 nics. Therefore the Linux box hangs off the same hub.

So similar to the Windoze setup i have 2 nics in the box and want to route from the external to the internal nic. In doze i use isa server, works a treat, in the linux box i use nothing cause this is where i am stuck.

Is there any easy reading papers out there that explain verbose the method of this network configuration? and how i can assign it all to talk happily together. I can set up Linux boxs to hand off the doze network no probs but i really want to master the server setup as above and hang the Linux boxs off the linux server. I'm tryin to break the Bill gates grip a little, if you know what i mean. :-)

Thanx in advance.

Grunthos
17-01-2004, 11:34 AM
with those IP addresse I am assuming you are going to be using NAT (network address translation) / masquerading.

this is very simple to start with

on redhat 9 this is a small iptables script (slightly bigger if you want soem sort of firewalling but nat block alot of things to start with)

you chould have a command on RH9 called "adsl-setup" to get the adsl side iof things done. (adsl router/switch in bridge mode)

Run that (asks for username/passwd/etc) and then you need to have a file called "firewall-masq" (masquerading)

for iptables is can contain the following:

#!/bin/sh
modprobe iptable_nat
iptables -t nat -F
iptables -t nat -A POSTROUTING -o ppp+ -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
#end file

this is called automatically when you run adsl-start

most of the files you want reside in /etc/ppp/


from there you should be online. just point the default GW on the rest of the machines behind the linux box to the linux boxes internal nic IP :)

hope this helps out (I run slackware so it could be slightly different)
-Grunthos

Pigs
17-01-2004, 05:47 PM
Grunthos,
Thanx heaps for the reply. Now I'm really confused:confused:

The router I have already connects to the net without assistance using PPPOE, so the router has the net connection already established, I forward that output to a hub where My windoze server external nic connects and forwards the connection to my internal nic via ias server, my RH9box connects to the same hub.

The problem I have is how in the world do i get my external nic to forward to the internal nic on the RH9 box. I am still spinning.

Hey thanx for the reply, hope the above makes some sense

Cheers

sticky_chicken
17-01-2004, 07:34 PM
Grunthos,


The problem I have is how in the world do i get my external nic to forward to the internal nic on the RH9 box. I am still spinning.

Hey thanx for the reply, hope the above makes some sense

Cheers


Can you show us the results of a netstat -rn?

Here's mine:

Destination Gateway Genmask Flags MSS Window irtt Iface
255.255.255.255 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
218.214.4.x 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
218.214.4.x 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
202.154.95.173 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 202.154.95.173 0.0.0.0 UG 0 0 0 ppp0


Bear in mind that I use my linux box to bring up the ppp session - my modem acts as a bridge only.