ejabberd - Comments for "[ejabberd 2.0] S2S : proxying on the same port" https://www.ejabberd.im/node/2926 en random port problem https://www.ejabberd.im/node/2926#comment-52130 <p>Thanks for your help badlop.</p> <p>After try, this doesn't work.<br /> I get a better result with applying the two code lines ( "{outgoing_s2s_port, 5268}." and "{5268, ejabberd_s2s_in, [" ) of your solution on each servers.</p> <p>When I scan ports, the opening connection come from a random port like<br /> - FROM ejabberd A random port Y TO ejabberd B port 5268</p> <p>then, ejabberd B respond<br /> - FROM ejabberd B port 5268 TO ejabberd A random port Y</p> <p>The firewall accepted the response because A opened the connection to B, and B responded on the same port.</p> <p>But after a while, B would like to open a connection to A from random port X to 5268. This connection is blocked because opened by B (firewall doesn't allow that).<br /> To test this, I add a contact situated on B server to the list of A client. B certainly need to open a connection.<br /> I think my problem doesn't have solution in this configuration. Each connection opened by B will be blocked by the firewall.</p> <p>Thanks again.<br /> Yougouff</p> Mon, 07 Apr 2008 09:01:47 +0000 yougouff comment 52130 at https://www.ejabberd.im Try the undocumented option: outgoing_s2s_port https://www.ejabberd.im/node/2926#comment-52113 <div class="quote-msg"> <div class="quote-author"><em>yougouff</em> wrote:</div> <p>Otherwise, I read there is a patch for proxying with ejabberd 1.3 called s2s_proxy. I heard it will be develop for ejabberd 2.X. It's a good thing, helpful in my case.</p></div> <p>But s2s_proxy uses s2s to communicate between proxy client and proxy server, so I guess you will suffer the same problem.</p> <div class="quote-msg"> <div class="quote-author"><em>yougouff</em> wrote:</div> <p>My single solution with the firewall is to open a connection with a port X and respond on this port X like this:<br /> - FROM ejabberd A port X TO ejabberd B port Y<br /> - FROM ejabberd B port Y TO ejabberd A port X</p> <p>Is it possible to configure S2S so ? (I don't think but who know ?)</p></div> <p>You can try this, maybe it works.</p> <p>In the first server:</p> <pre>%% If SRV lookup fails, then port 5268 is used to communicate with remote server {outgoing_s2s_port, 5268}.</pre><p> In the second server where incoming TCP connections to port 5269 are blocked:</p> <pre>{listen, [ ... {5268, ejabberd_s2s_in, [ {shaper, s2s_shaper}, {max_stanza_size, 131072} ]} ]}.</pre> Sat, 05 Apr 2008 17:53:56 +0000 mfoss comment 52113 at https://www.ejabberd.im [ejabberd 2.0] S2S : proxying on the same port https://www.ejabberd.im/node/2926#comment-52082 <p>Hum... Yes, it looks like difficult.</p> Wed, 02 Apr 2008 06:56:23 +0000 yougouff comment 52082 at https://www.ejabberd.im