Results 1 to 4 of 4

Thread: udhcpc reinits iptables FORWARD chain

  1. #1

    Exclamation udhcpc reinits iptables FORWARD chain

    I'm working on a per host traffic monitoring script, using RETURN rules in the FORWARD chain.

    The problem is that whenever udhcpc get a new wan lease the FORWARD chain is reloaded, loosing my own rules among with its counters..

    Is there any way to avoid this or should i modify my script??

    Any suggestions for some new iptables rules to log the in/out to each lan user?

    This is the iptables rules i would like to use:
    Code:
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination
    RETURN     tcp  --  192.168.0.21         0.0.0.0/0
    RETURN     tcp  --  0.0.0.0/0            192.168.0.21

  2. #2
    Join Date
    Jun 2004
    Location
    Delft, The Netherlands
    Posts
    60
    I experience similar problems,e.g. iptables rules disappear without a reset of the router. I can not figure out what the disapperaing triggers. I am using pptp from my router to ADSL modem (ppp0 WAN interface). I checked whether a re-establishment of the ppp session triggers the lost of iptables FORWARD rules. Indeed, the rules disappear!

    How to save these (ip accounting) FORWARD rules or how to know when ppp session is re-established?
    Last edited by sodb; 11-10-2005 at 20:36.

  3. #3
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,258
    use post-firewall to recover rules. in fact asus code flushes firewall on every reconnect/renew.

  4. #4
    Join Date
    Jun 2004
    Location
    Delft, The Netherlands
    Posts
    60
    Yes, how obvious...... it works. Initially I put the rules in the post-boot script. Because I use rrdtools to log traffic, a reset of the iptable counter is only a 5 minute loss of data.

Similar Threads

  1. Replies: 5
    Last Post: 03-09-2005, 16:05
  2. Forward to MAC address
    By Willie2_z in forum WL-500g Custom Development
    Replies: 23
    Last Post: 19-07-2005, 20:29
  3. Replies: 4
    Last Post: 11-05-2005, 20:45
  4. Port forward
    By Lightah in forum WL-500g Q&A
    Replies: 0
    Last Post: 16-02-2005, 16:06

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •