LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 06-11-2003, 02:17 PM   #1
Inix
LQ Newbie
 
Registered: Jun 2003
Distribution: slackware
Posts: 3

Rep: Reputation: 0
need help setting up slack box as gateway


I'm not 100% sure "gateway" is the correct term, here is an explination of what im trying to do.

We have a classroom LAN, which in turn connects (through the computer im trying to set up) to an intranet, which then connects to the internet.

My progress so far, i can see (meaning i can ping) the othe computers in the classroom, i also have internet access through this computer, however, the other computers in this classroom do not have internet access. From what my teacher has told me, the intranet uses DHCP. So eth1 is using DHCP while eth0 (the nic that connects to hub in our classroom) is using a static ip.

I have gathered that their are a variety of programs (from reading web sites) that can possibly fill the needed role, but i don't know how to use them or which one would be most applicable to this situation.

Any help much appreciated, thx!

PS: If i am to confusing or unclear, plz let me know what additional information i should provide.
PPS: Im a newb
 
Old 06-11-2003, 02:35 PM   #2
tangle
Senior Member
 
Registered: Apr 2002
Location: Smithville, TN
Distribution: Slackware
Posts: 1,745

Rep: Reputation: 71
A couple of questions. Do you want a firewall on this machine? Do you want to isolate it from the intranet and make you own subnet? Do you want to allow PCs in the classroom to get IP addresses from outside the classroom?

You can use iptables to do all this.
 
Old 06-11-2003, 02:52 PM   #3
Inix
LQ Newbie
 
Registered: Jun 2003
Distribution: slackware
Posts: 3

Original Poster
Rep: Reputation: 0
all the computers in the classroom need access to the internet throught the slack gateway.

I gess i need help with the iptables?
Could you give me a command-line example command for the setup of iptables?

PS: Don't really need a firewall considering the intranet we are plugged into has 2 of them
 
Old 06-11-2003, 03:01 PM   #4
tangle
Senior Member
 
Registered: Apr 2002
Location: Smithville, TN
Distribution: Slackware
Posts: 1,745

Rep: Reputation: 71
Do you need to obtain an IP address from the DHCP server?
 
Old 06-12-2003, 08:31 AM   #5
Inix
LQ Newbie
 
Registered: Jun 2003
Distribution: slackware
Posts: 3

Original Poster
Rep: Reputation: 0
"Do you need to obtain an IP address from the DHCP server?"

Yes, for the external network
We use a seperate (static) IP for the classroom's network
 
Old 06-12-2003, 08:57 AM   #6
tangle
Senior Member
 
Registered: Apr 2002
Location: Smithville, TN
Distribution: Slackware
Posts: 1,745

Rep: Reputation: 71
Goto http://morizot.net/firewall/gen/index.php.
 
Old 06-13-2003, 05:05 AM   #7
Funzo
LQ Newbie
 
Registered: May 2003
Posts: 4

Rep: Reputation: 0
I have a similar setup, where eth1 is the net and eth0 is the local LAN. I just added these lines to my /etc/rc.d/rc.local file:

echo "Starting up DHCP"
dhcpcd -t 10 eth1
echo "Done"
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -s 192.168.0.1/24 -j MASQUERADE

where 192.168.0.0 is the network address for the local LAN with a netmask of 255.255.255.0

Of course for this to work, you have to enable the appropriate kernel options; put simply, I just packet socket, the usual suspects needed for TCP/IP and every option under "IP: Netfilter Configuration" as a module(this is on a 2.4.20 kernel BTW).

Hope this helps
 
  


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
VPN gateway with linux BOX jobbe314 Linux - Networking 5 08-02-2005 10:43 PM
XP box as gateway for FC3 box mas3773 Linux - Networking 1 06-15-2005 09:57 PM
Linux box as a gateway/router dooda5555 Linux - Networking 2 04-29-2005 02:06 PM
[slack 10] setting standard gateway while using dhcp lease Peluso Linux - Networking 2 11-08-2004 08:59 AM
Setting up Slack to run through NAT gateway to cable? meatball Slackware 1 04-05-2003 06:14 PM


All times are GMT -5. The time now is 06:15 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration