News: This forum is now permanently frozen.
Pages: [1]
Topic: help with ipfw commands  (Read 2041 times)
« on: September 06, 2007, 03:37:47 »
daemorok *
Posts: 3

I have been trying to add rules to ipfw using the exec.php, but i keep getting strange errors.  One reason may be that I have the command formatted incorrectly.

This is the command I need in iptables format:
iptables -A INPUT -p tcp –dport $btport –tcp-flags RST RST -j DROP

this what I have figured out from google and ipfw man page (it could easily be wrong):
ipfw add drop from any to any tcp src-port $btport tcpflags rst

Is there another place i can add this commands (possibly download and edit the config and re-upload it?)

Do I have the ipfw command formatted correctly?

Thanks

« Reply #1 on: September 10, 2007, 01:59:26 »
cmb *****
Posts: 851

ipfw isn't loaded unless you're using the traffic shaper or captive portal. That may be a problem, but more importantly, what are you trying to do?
« Reply #2 on: September 14, 2007, 07:31:25 »
daemorok *
Posts: 3

I don't have the traffic shaper or the captive portal on at the moment.  I was trying to figure out the traffic shaper at one point, but I could never get it working right.

Comcast is throttling bittorrent traffic by using reset packets, supposedly this will help get around the throttling.

I actually came across a larger script recently:
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
#Comcast BitTorrent seeding block workaround
-A RH-Firewall-1-INPUT -p tcp --dport 6883 --tcp-flags RST RST -j DROP
#BitTorrent
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 6883 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 6883 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT

It seems like the one line might be all I need.
 
Pages: [1]
 
 
Powered by SMF 1.1.20 | SMF © 2013, Simple Machines