Jump to content

Little Issue , Mk3 + Bt5 + Port Forwarding Using Iptables


p0mad

Recommended Posts

This is what I would use to say forward all port 80 to a listening SSLStrip on 31337

iptables -t nat -A OUTPUT -p tcp --dport 80 -j DNAT --to-destination 127.0.0.1:31337

I would suggest getting the wp3.sh from the wiki quick start (wget wifipineapple.com/wp3.sh) and then do your custom forward to say a listening proxy like sslstrip if you need to. Otherwise all traffic will be passed through and off to the internet.

Edited by Mr-Protocol
Link to comment
Share on other sites

What about after??? How would you refresh the IPTABLES back to "normal" after running SSLStrip and editing the IPTABLES? Just run the wp3.sh script again? Or is there a one liner that will reset BTR1 back to it's default state (which would be preferred).

That rule needs something listening (sslstrip in that case).

It's been a little time since i've played with IPTables, but why the need for this specific rule of forwarding one port to another locally to another program?

Link to comment
Share on other sites

What about after??? How would you refresh the IPTABLES back to "normal" after running SSLStrip and editing the IPTABLES? Just run the wp3.sh script again? Or is there a one liner that will reset BTR1 back to it's default state (which would be preferred).

reboot the machine or run iptables -F to flush the settings.

Link to comment
Share on other sites

Ok so replying to myself

Tried

iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-ports 31337

And it works ..

My original was

iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 31337

note the difference ...

Anyway ... it works now

Bleh

I'm sure we have all done this from time to time, I know I have :) glad you got it working!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...