<div dir="ltr">Thats what my query is... how do u make sure? Your service seems to be LISTENing on ethX, but not on "localhost". You can access it from outside means it is listening on your ethX interface.<div><br>
</div><div style>e.g. my smtp is listening on localhost</div><div style><br></div><div style><div>[root@myhost ~]# netstat -an | grep 127.0.0.1</div><div>tcp 0 0 <a href="http://127.0.0.1:25">127.0.0.1:25</a> 0.0.0.0:* LISTEN</div>
<div><br></div></div></div><div class="gmail_extra"><br clear="all"><div>ShiB.<br>while ( ! ( succeed = try() ) );</div>
<br><br><div class="gmail_quote">On Wed, Jul 31, 2013 at 2:48 PM, Robin Monjo <span dir="ltr"><<a href="mailto:robin.monjo@applidget.com" target="_blank">robin.monjo@applidget.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Yes absolutely sure since I can access it from the outside<div><div class="h5"><div><br><div><div>On Jul 31, 2013, at 11:15 AM, Shibashish <<a href="mailto:shib4u@gmail.com" target="_blank">shib4u@gmail.com</a>> wrote:</div>
<br><blockquote type="cite"><div dir="ltr">Are you sure your service is listening on localhost:<port> ?<div><br></div><div>I'd use "netstat" to verify that first.</div></div><div class="gmail_extra"><br clear="all">
<div>ShiB.<br>
while ( ! ( succeed = try() ) );</div>
<br><br><div class="gmail_quote">On Wed, Jul 31, 2013 at 2:31 PM, Robin Monjo <span dir="ltr"><<a href="mailto:robin.monjo@applidget.com" target="_blank">robin.monjo@applidget.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div style="text-align:left"><font face="Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif" size="4"><span style="line-height:18px">Hello, I'm struggling with port forwarding for requests coming from localhost.</span></font></div>
<div style="text-align:left"><font face="Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif" size="4"><span style="line-height:18px"><br></span></font></div>
<div style="text-align:left"><p style="clear:both;vertical-align:baseline;line-height:18px;font-size:14px;font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;margin:0px 0px 1em;word-wrap:break-word;border:0px;padding:0px">
I run some linux container on my ubuntu host. Each one of them are running a webapp. To be able to access these webapps, I use iptables to forward port:</p><pre style="margin-top:0px;margin-bottom:10px;padding:5px;border:0px;font-size:14px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;overflow:auto;width:auto;max-height:600px;line-height:18px">
<code style="margin:0px;padding:0px;border:0px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif">sudo iptables -t nat -A PREROUTING -p tcp --dport <port> -j DNAT --to-destination #<container_ip>:<port>
</code></pre><p style="clear:both;vertical-align:baseline;line-height:18px;font-size:14px;font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;margin:0px 0px 1em;word-wrap:break-word;border:0px;padding:0px">
This work well if the traffic comes from outside of my machine. If the request is done by localhost it doesn't work:</p></div><span style="font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;background-color:rgb(238,238,238);font-size:14px;line-height:18px;text-align:left"> curl <host_ip>:<port> #works (from outside the host)</span><pre style="margin-top:0px;margin-bottom:10px;padding:5px;border:0px;font-size:14px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;overflow:auto;width:auto;max-height:600px;line-height:18px;text-align:left">
<code style="margin:0px;padding:0px;border:0px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif"> curl <container_ip>:<port> #works (from inside the host)
curl <a href="http://127.0.0.1/" target="_blank">127.0.0.1</a>:<port> #doesn't work (from inside the host)</code></pre><div><br></div><div>Any clue how to be able to make this last curl command working ?</div>
<div><br></div><div>Regards,</div><div>Robin</div></div><br>------------------------------------------------------------------------------<br>
Get your SQL database under version control now!<br>
Version control is standard for application code, but databases havent<br>
caught up. So what steps can you take to put your SQL databases under<br>
version control? Why should you start doing it? Read more to find out.<br>
<a href="http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk" target="_blank">http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk</a><br>_______________________________________________<br>
Lxc-users mailing list<br>
<a href="mailto:Lxc-users@lists.sourceforge.net" target="_blank">Lxc-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/lxc-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/lxc-users</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div></div></div></div></blockquote></div><br></div>