Shell Script to Start and Login via Netgear WG311 Marvell 88w8335 Wireless Card
Posted in Script
See how to configure - Linux Install and Configure Netgear WG311 Marvell 88w8335 Rev 03 Chipset Wireless Card
#!/bin/bash # Shell Script to Start and Login via Netgear WG311 Marvell 88w8335 Wireless Card # ------------------------------------------------------------------------- # See URL for usage information: #http://www.cyberciti.biz/faq/marvell-88w8335-chipset-netgear-wg311-pcicard-driver/ # ------------------------------------------------------------------------- # Copyright (c) 2008 nixCraft project <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. # ------------------------------------------------------------------------- INTERNET_IFACE="wlan0" echo "Starting Wireless ${INTERNET_IFACE}..." wpa_supplicant -B -c/etc/wpa_supplicant.conf -iwlan0 sleep 15 echo "Getting IP address..." dhclient $INTERNET_IFACE echo "Starting Firewall Setup..." # 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 #unlimited iptables -A INPUT -i lo -j ACCEPT iptables -A OUTPUT -o lo -j ACCEPT # DROP all incomming traffic iptables -P INPUT DROP iptables -P OUTPUT DROP iptables -P FORWARD DROP # Allow full outgoing connection but no incomming stuff iptables -A INPUT -i ${INTERNET_IFACE} -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A OUTPUT -o ${INTERNET_IFACE} -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT # Allow bittorent # iptables -A INPUT -i ${INTERNET_IFACE} -p tcp --destination-port 6881:6999 -j ACCEPT # log everything else iptables -A INPUT -j LOG iptables -A INPUT -j DROP
Download - Email this to a friend - Printable version
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: /etc/wpa_supplicant.conf, bash shell script, iface, iptables, modprobe command, netgear wg311, port 6881, script collection, sleep command, tcp, wireless internet, wpa supplicant, wpa_supplicant command ~ Last updated on: April 24, 2008

