LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Iptables port forwarding problem (https://www.linuxquestions.org/questions/linux-networking-3/iptables-port-forwarding-problem-691948/)

PeeCee-BW 12-20-2008 05:49 PM

Iptables port forwarding problem
 
I've got a linux debian box (Eth 4 kernel 2.6) with Iptables to use as a router/firewall for my networks.

The configuration at this point:
Iptables ACCEPT all input/output/forward since it's just a testbox and i don't whant to lock my self out at this point.

1. DSL modem/router
external ip: 1.2.3.4
internal ip: 192.168.1.254
2. Linux router/firewall
ip(eth2): 192.168.1.68 / 255.255.255.0
ip(eth1): 10.0.0.254 / 255.0.0.0
ip(eth0): 192.168.0.254 / 255.255.255.0

on eth1 and eth2 are the internal networks of witch eth1 is private network and eth0 is the public network.

At this point i got internet (NAT) on eth1 and eth0 so internet works on both internet networks. But i can't get port forwarding to work from eth2 to eth1 to 10.0.0.1

I've searched this forum at first, but none of the solutions i've found seem to work. I've seen a lot of PREROUTING rules, but i can't seem to get them working in any way.

I just need a working example for my (until now) simple setup. I would like to forward port 8080 to 10.0.0.1 on eth1.

Would there be someone so kind to help me out here, i'm lost at this point.

PeeCee-BW 12-21-2008 05:00 PM

Oke, i've got it working now. I forgot the postrouting. But now when i set FORWARD in the 'filter chain' the connection fails again.

Is there someone who can help me with this?

fotoguy 12-22-2008 02:48 AM

Before we can help, could you post your iptables script, once we see what you have, we can then help to troubleshoot it.


All times are GMT -5. The time now is 08:36 AM.