This is a discussion on bittorrent firewall iptables within the Linux software forums, part of the Linux Getting Started category; Anyone any idea what i need to setup, i want secure script or something plz...
|
|||||||
| Register | FAQ | Members List | Calendar | Forgotten your password? | Mark Forums Read |
| Sponsored Links | ||
|
|
|
||||
|
Following script does all the stuff you want, It It allows all outgoing traffic from your box but only incoming bittorrent request. It open tcp ports 6881:6999
Code:
#!/bin/sh 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 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 eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT #allow bittorent incomming client request iptables -A INPUT -p tcp --destination-port 6881:6999 -j ACCEPT #Uncomment below to allow sshd incoming client request #iptables -A INPUT -p tcp --destination-port 22 -j ACCEPT # DROP everything and Log it iptables -A INPUT -j LOG iptables -A INPUT -j DROP
__________________
Rocky Jr. You may have my body & soul, but you will never touch my pride! If you have knowledge, let others light their candles at it. Certified to work on HP-UX / Sun Solaris / RedHat |
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ISO files to be served via bittorrent in FreeBSD | dhanesh | All about FreeBSD/OpenBSD/NetBSD | 0 | 10-11-2007 05:14 PM |
| Redhat linux 4 / 5 disable iptables firewall | chiku | Networking, Firewalls and Security | 0 | 04-27-2007 06:19 PM |
| iptables linux firewall laptop script for Airtel DSL | raj | Linux software | 1 | 12-14-2006 06:11 PM |
| Bittorrent Packages | sbhupathireddy | Linux software | 1 | 11-14-2006 04:53 PM |
| iptables bittorrent not working | Linux software | 2 | 01-25-2006 08:52 PM | |