LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   starting up (https://www.linuxquestions.org/questions/slackware-14/starting-up-482836/)

ssin14 09-12-2006 03:09 PM

starting up
 
Hi I m a newbie in using slackware linux. I am trying to set up a linux server.
This server has 2 NIC one that goes to cisco router and one in internal switch. I have installed disk 1 and 2 (installation disk). Now where should I start now ? I have read few documentation and I am still not clear. I have also downloaded source disk 3 and 4. Whats this for?

Now obviously I want 20 client Pc to access this linux machine to go out to use internet. I just want a server that can control the the flow of internet.Like I want to allow certain sites for my client pcs to access. I know I have to set up squidproxy, samba, DNS. But what shall I do after installing. I in a page where its says root@LAN: ..... (this LAN is my host name)

w3bd3vil 09-12-2006 07:57 PM

you would need to setup proper ips for both the nics. use the netconfig command and configure them.

Mr_C 09-12-2006 08:00 PM

one word: dnsmasq

http://www.gentoo.org/doc/en/home-router-howto.xml

here's the sweet spot.
Code:

┌─(clay@SobeK:pts/0)──────────────────────────────(~)─┐
└─(%)─ cat /root/Scripts/netshare.NAT.sh
# Clean up
iptables -F
iptables -t nat -F

# Default policies to handle unmatched traffic
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD DROP

# Variables
export INTERNAL_NET=eth0
export EXT_NET_SOURCE=ath0
export INTERNAL_IP_CLASS=10.10.10.0
export INTERNAL_SUB_CLASS=255.0.0.0

# Lock services to INTERNAL_NET
iptables -I INPUT 1 -i ${INTERNAL_NET} -j ACCEPT
iptables -I INPUT 1 -i lo -j ACCEPT
iptables -A INPUT -p UDP --dport bootps -i ! ${INTERNAL_NET} -j REJECT
iptables -A INPUT -p UDP --dport domain -i ! ${INTERNAL_NET} -j REJECT

# Allowed services via EXT_NET_SOURCE
iptables -A INPUT -p TCP --dport ssh -i ${EXT_NET_SOURCE} -j ACCEPT

# Drop TCP / UDP packets to privileged ports
iptables -A INPUT -p TCP -i ! ${INTERNAL_NET} -d 0/0 --dport 0:1023 -j DROP
iptables -A INPUT -p UDP -i ! ${INTERNAL_NET} -d 0/0 --dport 0:1023 -j DROP

# NAT
iptables -I FORWARD -i ${INTERNAL_NET} -d ${INTERNAL_IP_CLASS}/${INTERNAL_SUB_CLASS} -j DROP
iptables -A FORWARD -i ${INTERNAL_NET} -s ${INTERNAL_IP_CLASS}/${INTERNAL_SUB_CLASS} -j ACCEPT
iptables -A FORWARD -i ${EXT_NET_SOURCE} -d ${INTERNAL_IP_CLASS}/${INTERNAL_SUB_CLASS} -j ACCEPT
iptables -t nat -A POSTROUTING -o ${EXT_NET_SOURCE} -j MASQUERADE

# Enable IP Fowarding
echo 1 > /proc/sys/net/ipv4/ip_forward
for f in /proc/sys/net/ipv4/conf/*/rp_filter ; do echo 1 > $f ; done

In this case I've gone and shared my wireless to foward internet to my lan (I was setting up another laptop at the time)

ssin14 09-13-2006 12:23 AM

thanks for kind help. I think one of my NIC is not comming up. It only list one card. Before loading slackware I added new NIC which is compatible with Linux( as it said on the back of the packet)
how to initialise this new NIC.

ssin14 09-13-2006 02:49 AM

thank you for that...

when I type ifconfig -a
I cannot see the eth0 portion fully. The screen starts at

inet addr:..............

eth1 link.....

is something wrong?

unSpawn 09-14-2006 07:22 AM

Thread closed. Continuation is at http://www.linuxquestions.org/questi...d.php?t=483259
Please keep questions about the same topci together, thanks.


All times are GMT -5. The time now is 07:58 PM.