LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   need help setting up slack box as gateway (https://www.linuxquestions.org/questions/slackware-14/need-help-setting-up-slack-box-as-gateway-65010/)

Inix 06-11-2003 01:17 PM

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

tangle 06-11-2003 01:35 PM

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.

Inix 06-11-2003 01:52 PM

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

tangle 06-11-2003 02:01 PM

Do you need to obtain an IP address from the DHCP server?

Inix 06-12-2003 07:31 AM

"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

tangle 06-12-2003 07:57 AM

Goto http://morizot.net/firewall/gen/index.php.

Funzo 06-13-2003 04:05 AM

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


All times are GMT -5. The time now is 05:45 PM.