≡ Menu

Shell Script to Start and Login via Netgear WG311 Marvell 88w8335 Wireless Card

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 
# 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
{ 0 comments… add one }
Security: Are you a robot or human?

Leave a Comment