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

    need iptable help forwarding ip.

    I have a eth0 ( outside ip ) and a eth0:1 ( lan ip/192.168.0.x ) I want to take all 8080 traffic from out side and direct it to

    I tried

    iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 8080 -j DNAT --to
    and figured I may need

    iptables -A FORWARD -p tcp -i eth0 -d --dport 8080 -j ACCEPT
    but its not working. What did I do wrong? Do I need to do anything with apache2 as it shows the default it works page on 8080.

  2. #2
    Well I made it work on 3000 like so.

    iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 3000 -j DNAT --to-destination
    iptables  -A INPUT -i eth1 -p tcp -m tcp --dport 3000 -j ACCEPT

  3. #3
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    The Keystone State
    Now look at the 2 setups and see what is different between them. Then make sure what ever program you have listening on 808 is also listening on the 8080 on the ip address you want to redirect to.


    The adventure of a life time.

    Linux User #296285
    Get Counted

  4. $spacer_open

Posting Permissions

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