- J.J. Abrams sells new apocalypse show that sounds like the Emberverse series
- VIFF 2011: Review of Paddy Considine's violent and bleak TYRANNOSAUR
- J.J. Abrams sells new apocalypse show that sounds like the Emberverse series
- J.J. Abrams sells new apocalypse show that sounds like the Emberverse series
- New trailer for Kenji Kamiyama's 009 RE:CYBORG
- J.J. Abrams sells new apocalypse show that sounds like the Emberverse series
- J.J. Abrams sells new apocalypse show that sounds like the Emberverse series
- J.J. Abrams sells new apocalypse show that sounds like the Emberverse series
- J.J. Abrams sells new apocalypse show that sounds like the Emberverse series
- Re-killing bin laden in zombie actioner OSOMBIE (trailer)
- Re: Japanese zombie movies (2011-12 round-up)
- Re: Life Is Dead
- Balkans war revenge movie - Nicolas Cage?
- PA Film Archive
- i kill
- Re: Life Is Dead
- Monster Killer
- zombie films
- Re: Life Is Dead
- Re: Hello is anybody there?
- APOCALYPSE PIZZA VIDEO delivers during the zombie apocalypse!
- Concept art for Enki Bilal's next is PA animation ANIMAL'Z
- Trailer for ZOMBIE MURDER EXPLOSION DIE! All 4 of these in every episode!
- Wandering madly in the remnants of civilization in Greece's HIGUITA (teaser)
- THE HOST director's English language debut SNOW PIERCER adds cast
- Argentina invaded by NEWMEDIA aliens
- THE DIVIDE movie review
- THE RIDER still rides! New teaser reveals stunning final animation style
- EXCLUSIVE: Trailer for RAMPAGE IN HEAVEN sees The Monkey King and mech in a nightmarish dying world
- Sony could back Seth Rogan's THE APOCALYPSE (Jay and Seth vs. The Apocalypse)
- Russia's snowed under with zombies in WINTER OF THE DEAD
- SLAMDANCE 2012: Review of killer tattoo thriller COMFORTING SKIN
- DVD Review: Style overshadows heart in spunky comedy SPORK
- DVD Review: Daniel Craig loses his mind in mediocre DREAM HOUSE
- SUNDANCE 2012: Review of EXCISION
- SUNDANCE 2012: Review of THE PACT
- SUNDANCE 2012: Review of GRABBERS
- SUNDANCE 2012: Review of SAFETY NOT GUARANTEED
- SUNDANCE 2012: Review of the visionary BEASTS OF THE SOUTHERN WILD
- SUNDANCE 2012: Review of (Radio Shack) ROBOT AND FRANK
- SLAMDANCE 2012: Review of unimpressive UNCONDITIONAL
- SUNDANCE 2012: Review of EXCISION
- SUNDANCE 2012: Review of THE PACT
- SUNDANCE 2012: Review of GRABBERS
- EXCLUSIVE: Researching life after death in random data patterns in APOPHENIA (APOFANIA) (trailer)
- Willem Dafoe is THE HUNTER
- SUNDANCE 2012: Review of SAFETY NOT GUARANTEED
- THE WALKING DEAD teases a dire, breakneck return
- A Panda protects the innocent in WASTLANDER PANDA tv series
- Full Moon jumps on the Nazi train with PUPPET MASTER X: AXIS RISING
- SUNDANCE 2012: Review of the visionary BEASTS OF THE SOUTHERN WILD
- SUNDANCE 2012: Review of (Radio Shack) ROBOT AND FRANK
- Monty Python reunite for scifi comedy ABSOLUTELY ANYTHING
- Creature with cow tail lures men to their death in THALE (trailer)
- SLAMDANCE 2012: Review of unimpressive UNCONDITIONAL
- Seventeen and a robotic teddy bear for a best friend in ANIMALS (trailer)
- Costa Rican's pay it forward in apocalypse drama EL FIN
- New trailer for m*therfu**ing space nazi flick IRON SKY
- Berlinale 2012: Full Panorama program includes world premiere of IRON SKY
- If The Walking Dead was an 80s sitcom....
- First promo art for FANGS OF WAR - The allies fight over Dracula
Jack In
Latest Comments
Latest Forum Posts
PA News
Latest Reviews
Older News
Film Festivals
Berlin International Film Festival (Berlinale)
Feb 09 - Feb 19
Berlin, Germany
Boston Underground Film Festival
Mar 24 - Mar 31
Boston, Massacheusets
Yubari International Fantastic Film Festival
Feb 23 - Feb 27
Yūbari, Hokkaidō, Japan
Cinequest Film Festival
Feb 28 - Mar 11
San Jose, California
South by Southwest (SXSW)
Mar 09 - Mar 17
Austin, Texas
Staff
Don Neumann aka quietearth
Editor in Chief
Fort Collins/Denver, Colorado
agentorange
Managing Editor
Edmonton, Alberta
Marina Antunes
Assistant Managing Editor
Vancouver, British Columbia
projectcyclops
UK Correspondent
Edinburgh, Scotland
Rick McGrath
Toronto Correspondent
Toronto, Ontario
The Crystal Ferret
France Correspondent
Paris, France
rochefort
Austin Correspondent
Austin, Texas
kilowog
LA Correspondent
Los Angeles, California
Joao Fleck
South American Correspondent
Porto Alegre, Brazil
quietearth [General News 10.25.06]
First off, we need to install iptables-mod-extra and kmod-ipt-extra:
# ipkg install iptables-mod-extra kmod-ipt-extrathen we can manually load the kernel module so we can use it, and also add it into our startup sequence:
# insmod ipt_LOG
# echo ipt_LOG > /etc/modules.d/60-iptablesloggingFor testing purposes, we need to find out our wan (incoming) interface name:
# nvram get wan_ifnameFor my linksys wrt54gv4 it's vlan1, but your router may be different. This is where all the traffic from the outside comes in. Now run:
# iptables -Land we get a list of the available iptables policies (except for the pre-routing stuff which handles nat etc..). Here's what you might see for your INPUT chain:
Chain INPUT (policy DROP)
target prot opt source destination
DROP all -- anywhere anywhere state INVALID
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
DROP tcp -- anywhere anywhere tcp option=!2 flags:SYN/SYN
input_rule all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere
ACCEPT gre -- anywhere anywhere
REJECT tcp -- anywhere anywhere reject-with tcp-reset
REJECT all -- anywhere anywhere reject-with icmp-port-unreachableRules are numbered in descending order. When the target is DROP, the packet is immediately dropped and no further processing happens. If the target is ACCEPT, the packet is passed along to the regular packet handling routines in the kernel and no further processing happens. Basically either of these targets stop the packet from continuing along in the iptables chain. Here's a description of the first 4 rules in the chain:
1. Any weird tcp packets are dropped.
2. Any connections which are related (for say ftp-data) or already established connections are accepted.
3. Anything tcp packet without the syn flag set is dropped. (Run iptables -L -v for more detailed information, -L by itself doesn't show everything)
4. Jump to the input_rule chain. This chain then will probably jump to another chain. If the packet makes it through these it will come back and continue with rule 5.
Hopefully you get the point. We need to insert a new rule somewhere in our chain to log exactly what we'd like. Based on the fact that any packet that gets to rule #4 which is a jump to a new chain, we should only be getting tcp connection requests as well as udp, icmp and other packets. This is a good place to try our first rule.
# iptables -I input_rule -i vlan1 -j LOG --log-prefix "input: "This inserts a new rule in the input_rule chain at position 1, with the jump target of LOG which is the kernel module we installed before. This comes off the INPUT chain which is for packets sent to our router. For packets traveling through your router to other machines, or from inside going out, you will need to use FORWARD and OUTPUT respectively. The -i vlan1 means packets coming in our wan interface (we looked this up before). The log prefix is what will be sent to syslog as the beginning of the message. Once this is inserted, we can run the "logread" command to see if anything shows up, or check wherever our syslogs are sent too.
For me, I get a lot of random udp crap from my neighbors on the same network, so I need to further refine this. Let's delete our rule, doing so will not affect the order of anything else.
# iptables -D input_rule 1Let's just match tcp packets:
# iptables -I input_rule -i vlan1 -j LOG --log-prefix "input: " -p tcpUnfortunately we can't specify multiple protocols with -p. If we wanted to also log icmp, we'd have to add another logging rule.
To make the rules permanent, we can modify /etc/firewall.user, but this is a symlink by default, so:
# rm /etc/firewall.user
# cp /rom/etc/firewall.user /etcIt would also be a good idea to replace our wan interface name (vlan1 for me) with $WAN.
You should get the idea now. Here's a few more tips:
* -i is for traffic incoming on that interface. -o is for outgoing.
* we can also specify tcp flags, ports, ip addresses, etc in the filtering, so check out the Iptables match documentation for futher refinement.
* If you need more robust logging, say going to a mysql database or something, you will need to use ulogd (the userspace logging daemon). This is a howto for openwrt with ulog and postgressql, but it's relevant.
Finally, if any one has any further information, please comment!
Anonymous (5 years ago) Reply
very helpful, thanks
also note that after logging, the packet continues down the chain (it isnt dropped or accepted upon logging); this wasn't obvious to me so i tried it out lol
Roby (3 years ago) Reply
Great tutorial!
Leave a comment
Related articles



