iptables -FORWARD inquiry

Posted on 2007-10-14
Last Modified: 2010-04-22
Hey folks,

I'm trying to figure out a ruleset a wrote a while ago that I'm currently improvising.  I can't figure out for the life of me why I used something like this:

# allow packets leaving local loopback out
-A FORWARD -i lo -o eth1 -j ACCEPT

Does anyone have any clue why I would do something like this?


- sf
Question by:stevefNYC
    LVL 16

    Accepted Solution

    This rule really looks odd. I believe there will never be a packet matching this rule unless you are doing something strange on your machine.

    I believe packets would match this rule only if you were doing something like:
    iptables -t nat -A PREROUTING -i lo -p tcp --dport 2023 -j DNAT

    and then trying:
    telnet 2023
    LVL 39

    Assisted Solution

    iptables -nv -L FORWARD
    should give you some more details if this rule is used anyway.
    It is an odd rule....

    If the rule is used you might want to insert a
    -A FORWARD -i lo -o eth1 -j LOG ....
    before it so that you can see in the syslog what rules match this one.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Suggested Solutions

    Wikipedia defines 'Script Kiddies' in this informal way: "In hacker culture, a script kiddie, occasionally script bunny, skiddie, script kitty, script-running juvenile (SRJ), or similar, is a derogatory term used to describe those who use scripts or…
    The DROP (Spamhaus Don't Route Or Peer List) is a small list of IP address ranges that have been stolen or hijacked from their rightful owners. The DROP list is not a DNS based list.  It is designed to be downloaded as a file, with primary intention…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now