#!/bin/sh # Script to start DLink PCL wireless lan card 520 # ---------------------------------------------------------------- # Copyright (c) 2006 nixCraft <http://cyberciti.biz/fb/> # This script is licensed under GNU GPL version 2.0 or above # ------------------------------------------------------------------------- # This script is part of nixCraft shell script collection (NSSC) # Visit http://bash.cyberciti.biz/ for more information. # See url for more info: # http://www.cyberciti.biz/tips/linux-install-and-configure-dlink-dwl-g-520-wireless-lan-pci-card.html # ------------------------------------------------------------------------- # assing values # use 'iwlist ra0 scanning' command to get values SSID=nixcraft TYPE=Managed CHANNEL=6 KEY="your-key" INET=ra0 IWC="/sbin/iwconfig" # ok config ra0 $IWC $INET essid $SSID $IWC $INET mode $TYPE $IWC $INET channel $CHANNEL $IWC $INET key $KEY # firewall iptables -F iptables -X iptables -t nat -F iptables -t nat -X iptables -t mangle -F iptables -t mangle -X modprobe ip_conntrack modprobe ip_conntrack_ftp # Setting default filter policy iptables -P INPUT DROP iptables -P OUTPUT ACCEPT # Unlimited access to loop back iptables -A INPUT -i lo -j ACCEPT iptables -A OUTPUT -o lo -j ACCEPT # Allow UDP, DNS and Passive FTP iptables -A INPUT -i $INET -m state --state ESTABLISHED,RELATED -j ACCEPT #allow bittorent incomming client request :) iptables -A INPUT -p tcp --destination-port 6881:6882 -j ACCEPT #Uncomment below to allow sshd incoming client request #iptables -A INPUT -p tcp --destination-port 22 -j ACCEPT # DROP everything and Log it iptables -A INPUT -j LOG iptables -A INPUT -j DROP
4000+ howtos and counting! If you enjoyed this article, join 45000+ others and get free email updates!
Click here to subscribe via email.
Click here to subscribe via email.
- Download Script
- Email this to a friend
- Rss Feed
- Last Updated: 04/10/08






