http://theworm.altervista.org/cydia/ repositories in
Cydia > Manage > Sources > Edit > Add. Then install the
MobileTerminal (NEW) app from the insanelyi repository and the
network-cmds package from the other one. Then you can go into the terminal app you just got and run
ipfw. This will let you write to your firewall tables. If you need a tutorial on how to use ipfw, there's a good one here (skip to Step #2).
Edit: To anyone actually looking to use
ipfw on iOS, you're going to have to patch the kernel to include support for
pf. Documented, nobody has ever done it, but it's not technically impossible. The Jailbreak patches the kernel upon boot, so this would require the same exploits used during that process.