Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 12-20-2008, 05:49 PM   #1
LQ Newbie
Registered: Jun 2008
Posts: 5

Rep: Reputation: 0
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:
internal ip:
2. Linux router/firewall
ip(eth2): /
ip(eth1): /
ip(eth0): /

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

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 on eth1.

Would there be someone so kind to help me out here, i'm lost at this point.
Old 12-21-2008, 05:00 PM   #2
LQ Newbie
Registered: Jun 2008
Posts: 5

Original Poster
Rep: Reputation: 0
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?
Old 12-22-2008, 02:48 AM   #3
Senior Member
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: KirraMail Live Email Server
Posts: 1,285

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


forward, iptables, port

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Port forwarding problem in iptables. vedang Linux - Server 15 01-17-2008 03:04 AM
Port Forwarding Problem using IPTABLES ^vampire^ Linux - Networking 1 10-12-2006 06:27 AM
Port Forwarding Problem using IPTABLES ^vampire^ Linux - Security 1 10-12-2006 04:22 AM
iptables with port forwarding problem ... please help me rubenscript Linux - Networking 1 04-26-2006 04:51 PM
iptables problem.....port forwarding..... shahg_shahg Linux - Networking 1 03-22-2006 05:17 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:23 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration