View Single Post
Old 8th June 2008, 02:30
chillifire chillifire is offline
HowtoForge Supporter
Join Date: Oct 2007
Posts: 75
Thanks: 3
Thanked 3 Times in 3 Posts
Default not quite the setup I thought I described :-)

Thanks for the response. This describes a scenario similar to what I am looking for. Well, I thought I was reasonably clear, but may be I was not.

So here is a diagram of the network setup and a second diagram of the request handling I am thinking of. Don't worry about the iptables magic that has to happen on the router. There is tons of info out there on that, so that I can handle.

But what has to be configured with IPTABLES or otherwise on the Ubuntu server (the one in the middel of the diagram with address Does the setup shown in the diagrams require a change in the solution proposed above? I should think so, but what does it look like?

So let me try and understand the lines from above:
IPTABLES -t nat -A PREROUTING  -d $IP_INET -p tcp --dport 5678 -j DNAT --to-destination
so here you are doing the forwarding and I guess to saty with my example this should be something like:
IPTABLES -t nat -A PREROUTING  -d -p tcp --dport u -j DNAT --to-destination 10.8.x.b:8080
OK, so I guess
$IPTABLES -t nat -A OUTPUT -p tcp -d $IP_INET --dport 5678 -j DNAT --to-destination
should become
$IPTABLES -t nat -A OUTPUT -p tcp -d --dport u -j DNAT --to-destination 10.1.x.b:8080
I am not sure why I need this rule, so would appreciate some enlightenment. And why is there no FORWARD rule? The noob I am in this I would have assumed I need a FORWARD rule to , well, basically forward. Is that not so? and why not?
and with
$IPTABLES -t nat -A POSTROUTING -p tcp -d --dport 80 -j SNAT  --to-source $IP_LAN
you totally surpas my understanding. What is that rule achieving? And since there is no local network involved there is no sensible value for $IP_LAN I can make out in my own mind. Does that mean this rule is superflous for my scenario?

Thanks again for bothering to respond. I would be greatful, if you could stick with me and maybe I am a bit clearer on what I am trying to achieve now, so you can give some further advice.


Attached Images

Last edited by chillifire; 8th June 2008 at 08:19.
Reply With Quote