Linux / UNIX Tech Support Forum
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 ...
|
|||||||
| Linux software General questions and discussion about Redhat/Fedora Core/Cent OS, Debian and Ubuntu Linux related to softwares should go here. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
| 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
__________________
Vivek Gite Linux Evangelist |
![]() |
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 | 14-10-2007 05:00 AM |
| Redhat linux 4 / 5 disable iptables firewall | chiku | Networking, Firewalls and Security | 0 | 27-04-2007 05:19 PM |
| Linux my laptop computer unable to power off when I shutdown | cityblogger | Linux software | 1 | 05-07-2006 12:24 PM |
| Intel Centrino laptop Red Hat or Fedora Core Linux wireless | tom | Getting started tutorials | 1 | 17-06-2006 01:50 PM |
| bittorrent firewall iptables | Linux software | 1 | 08-01-2006 12:58 AM | |