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 <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
Get the latest tutorials on SysAdmin, Linux/Unix, Open Source, and DevOps topics:
CategoryList of Unix and Linux commands
File Management cat
Firewall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilities dig host ip nmap
OpenVPN CentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Manager apk apt
Processes Management bg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searching grep whereis which
User Information groups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPN CentOS 8 Debian 10 Firewall Ubuntu 20.04
0 comments… add one

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.