This is a discussion on iptables linux firewall laptop script for Airtel DSL within the Linux software forums, part of the Linux Getting Started category; Dear all, Finally I brought a new Dell lappy and installed Fedora Core Linux. My usage Download send email using ...
|
|||||||
| Register | FAQ | Members List | Calendar | Forgotten your password? | Mark Forums Read |
|
|||
|
Dear all,
Finally I brought a new Dell lappy and installed Fedora Core Linux. My usage Download send email using AIRTEL email server Bittorent download Browse internet Chat using Yahoo messenger I am connected to internet via Airtel Ethernet router. Please give me a shell script that protect my laptop from scum of the universe aka Internet Regards,
__________________
Raj Linux rulz. I have never turned back in my life ; I shall not do so today.. haha |
| Sponsored Links | ||
|
|
|
||||
|
Code:
#!/bin/bash # Clean 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, drop all incoming 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 incoming client request :) iptables -A INPUT -p tcp --destination-port 6881:6882 -j ACCEPT iptables -A INPUT -p tcp --destination-port 443 -j ACCEPT # router request @ port 514 # iptables -A INPUT -p udp --destination-port 514 -j ACCEPT #Uncomment below to allow sshd incoming client request #iptables -A INPUT -p tcp --destination-port 22 -s IP -j ACCEPT # DROP everything in case ;) and Log it iptables -A INPUT -j LOG iptables -A INPUT -j DROP |
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Firewall script addition request | meowing | Shell scripting | 0 | 10-14-2007 06:00 AM |
| Redhat linux 4 / 5 disable iptables firewall | chiku | Networking, Firewalls and Security | 0 | 04-27-2007 06:19 PM |
| Linux my laptop computer unable to power off when I shutdown | cityblogger | Linux software | 1 | 07-05-2006 01:24 PM |
| Intel Centrino laptop Red Hat or Fedora Core Linux wireless | tom | Getting started tutorials | 1 | 06-17-2006 02:50 PM |
| bittorrent firewall iptables | Linux software | 1 | 01-08-2006 01:58 AM | |