nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

bittorrent firewall iptables

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...


Go Back   nixCraft Linux Forum > Linux Getting Started > Linux software

Linux answers from nixCraft.


Linux software General questions and discussion about Redhat/Fedora Core/Cent OS, Debian and Ubuntu Linux related to softwares should go here.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-01-2006, 12:03 AM
Guest
 
Posts: n/a
Default bittorrent firewall iptables

Anyone any idea what i need to setup, i want secure script or something plz
Reply With Quote
  #2 (permalink)  
Old 08-01-2006, 12:58 AM
rockdalinux's Avatar
Is that all you got?
User
 
Join Date: May 2005
Location: Planet Vegeta
OS: Redhat
Posts: 708
Thanks: 15
Thanked 19 Times in 18 Posts
Rep Power: 10
rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light
Default

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.
What's wrong? I hope I am not making you uncomfortable...

Never send a boy to do a mans job.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
ISO files to be served via bittorrent in FreeBSD dhanesh All about FreeBSD/OpenBSD/NetBSD 0 11-10-2007 04:14 PM
Redhat linux 4 / 5 disable iptables firewall chiku Networking, Firewalls and Security 0 27-04-2007 05:19 PM
iptables linux firewall laptop script for Airtel DSL raj Linux software 1 14-12-2006 05:11 PM
Bittorrent Packages sbhupathireddy Linux software 1 14-11-2006 03:53 PM
iptables bittorrent not working Linux software 2 25-01-2006 07:52 PM


All times are GMT +5.5. The time now is 03:11 PM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38