Find the answer to your Linux question:
Results 1 to 7 of 7
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    redirect using iptables

    I'm trying to redirect all traffic going to a certain IP to an internal IP. I think think can be done using iptables.

    for example I want all traffic destined to to go to an internal web server

    any ideas?


  2. #2
    Linux Engineer
    Join Date
    Nov 2004
    Montreal, Canada
    Here's a great web site that you need to have a look at... It'll give you all the required info about forwading IP request

    Please hit me back if you require more information
    \"Meditative mind\'s is like a vast ocean... whatever strikes the surface, the bottom stays calm\" - Dalai Lama
    \"Competition ultimatly comes down to one thing... a loser and a winner.\" - Ugo Deschamps

  3. #3
    That is a great site, but unfortunately I couldnt find what I'm looking for. I'm not sure if I worded my question correctly. What I'm trying to do is stop all outgoing requests to only specific IP on the web all other request I would like it to pass thru. When there is a request going to one specific IP-I want it redirected to an internal web site.

  4. $spacer_open
  5. #4


  6. #5
    The link posted above is the one you need. All you have to do is IP FORWARDING.
    Check this link and this link.

  7. #6

    you people are morons

    why do you think it neccessary to fill the internet with misinformation about how to perform a ceratin action?

    he wants to redirect outgoing traffic to an internal machine. this has NOTHING to do with NAT or masquerading. you people have no idea what you're talking about about. you post replies thinking that you are helping someone when in reality you are polluting search engines with ridiculous answers. the individual who replied with IP FORWARDING in all uppercase has absolutely no understanding of IP, let alone the netfilter implementations in linux 2.4+.

    a word to all those amateur computer WHIZZARDS! out there -- don't say ANYTHING unless you can back it up with solid information.

    what you want is the PREROUTING chain for the nat table:

    iptalbes -t nat -A PREROUTING -d \
    -p tcp --dport 80 -j DNAT --to

  8. #7
    SuperMod (Back again) devils casper's Avatar
    Join Date
    Jun 2006
    Chandigarh, India
    HI punkpulse !

    This thread is more than three years old. I dont think thread starter needs any help after such a long time.
    I would suggest you post suggestion in a bit recent threads.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Posting Permissions

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