sslstrip on FreeBSD - Enabling NAT using ipfw

The below is an attempt to add a NAT to forward packets on port 80 to 10000

sslstrip requires four steps to be performed given in its README but the creator has sadly considered that everybody will be using only Linux, hence the directions.

I would like to run sslstrip under FreeBSD.

The first requirement is to set the machine into forwarding mode:
Code:
#sysctl net.inet.ip.forwarding=1

Third step is to run sslstrip with its parameters.

Fourth step is to arpspoof (Can be done using arpspoof (dsniff package), other methods).

The second step was:
Code:
"2) Setup iptables to intercept HTTP requests (as root):
           iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port <yourListenPort>"

For this, under FreeBSD shoudl the below suffice?
Code:
ipfw add 1000 fwd 127.0.0.1,80 tcp from any to me 10000
ipfw add 1000 fwd 192.168.<whatever_my_third_octet>.<whatever_my_fourth_octet>,80 tcp from any to me 10000
I tried it but by ipfw says :
Code:
"ipfw: getsockopt(IP_FW_ADD): Protocol not available"

Seems like 'ipf' is running instead. Any inputs?
 
ipfw add 1000 fwd 127.0.0.1,80 tcp from any to me 10000
This one would be enough.

Code:
"ipfw: getsockopt(IP_FW_ADD): Protocol not available"
Seems like 'ipf' is running instead. Any inputs?
No, it's just a seems you haven't got loaded ipfw module # kldload -v ipfw or/and haven't got a neccesary
Code:
options IPFIREWALL_FORWARD
string in your kernel config.
 
Code:
kldload -v ipfw
Loaded ipfw, id=5

It did load. But blocks all. Will figure that out. Also will test sslstrip. Thanks RusDyr.
 
Back
Top