Find the answer to your Linux question:
Results 1 to 4 of 4
hi all.. i'm new in this forum,, i have problem with my configuration iptables, i have configured for transparent like this, for masquerade -> iptables -t nat -A POSTROUTING -o ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2010
    Posts
    1

    not redirecting specific address


    hi all.. i'm new in this forum,,
    i have problem with my configuration iptables,

    i have configured for transparent like this,

    for masquerade -> iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
    for transparent -> iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 3128

    my question how to make a rule if there 1 address i dont want to redirect to port 3128? in other words 1 specific address just run on port 80..

    please help me.....

  2. #2
    Just Joined!
    Join Date
    May 2009
    Posts
    7
    If i had understood correctly, you need a rule to redirect all request on port 80 to 3128 and at the same time not for a particular ip address.

    iptables -t nat -A PREROUTING -p tcp -s ! <ipaddress> --dport 80 -j REDIRECT --to-ports 3128

    if request comes from mention source <ipaddress> than it will not be redirected to 3128

    Thanks

  3. #3
    Just Joined!
    Join Date
    Dec 2009
    Posts
    1

    Question

    Quote Originally Posted by ahamedoaa View Post
    If i had understood correctly, you need a rule to redirect all request on port 80 to 3128 and at the same time not for a particular ip address.

    iptables -t nat -A PREROUTING -p tcp -s ! <ipaddress> --dport 80 -j REDIRECT --to-ports 3128

    if request comes from mention source <ipaddress> than it will not be redirected to 3128

    Thanks
    how the rule if we just facebook address not redirect??

    help me please, i'm new in linux...

  4. #4
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,672

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

Posting Permissions

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