client behind firewall unable to connect to :2222


Does is work for you..

It would be really handy to have something like this implemented for DA.

Well, most people don't use them since it can be a possible security problem, although I password protect it and only allow it through HTTPS.

I haven't tested it under DA, buth I use it on my personal server and it works. It might have some premission problems under DA, but that could easily be fixed - it doesn't harm to try.

Also, look at PHP Proxy:

http://sourceforge.net/projects/php-proxy/
 
Last edited:
I have just installed this script (cgiproxy),
and works! but not with DA...

I get this error
-----------------------------
CGIProxy Error


Error by target server: no WWW-Authenticate header.
-------------------------------

This thing really sucks! :confused:

dec said:
Does is work for you..

It would be really handy to have something like this implemented for DA.
 
BTW I found this thread in sourceforge regarding php web proxy...according to it
it doesn't with work wih HTTP Basic Authentication.
http://sourceforge.net/forum/forum.php?thread_id=1169602&forum_id=173954


I wish DA had a solution for this, just like Cpanel has... this sort of things and others make me regret my move to DA... but there is still a point in favor of DA, they are still in version 1.2x they still have a long road ahead... Cpanel is in version 9.x
 
I get this error
-----------------------------
CGIProxy Error


Error by target server: no WWW-Authenticate header.
-------------------------------

Well, what web-site are you trying to visit?

This is because I though DA doesn't use HTTP Basic Authentication but rather gets username/password through a form?
 
Some time ago, I also tried to tweak the php proxy that is available for cpanel users, but althought it loaded the DA's login page without problems, it couldn't authenticate my user/password.
And always returned an invalid user/pass error.
 
Well,

Why don't you use the firewall (on the DA server) to just forward packets from a port like 2082 (used by CPanel) to 2222?

The client wouldn't know the difference.
 
saman said:
Well,

Why don't you use the firewall (on the DA server) to just forward packets from a port like 2082 (used by CPanel) to 2222?

The client wouldn't know the difference.

Has anybody tried this?

Any other way to get around this?

Dec
 
Here is an IPTables line that I have successfully used to redirect ports:

$IPTABLES -t nat -A PREROUTING -m tcp -p tcp --dport 8080 -j REDIRECT --to-port 2222

I have changed the port numbers to something you might want to try.

(Note: I have not tried this with DirectAdmin. This was for an internet filtering server)

Louie
 
Last edited:
rldev said:
Why can't you change the port DA is runing on?

I think this is the only solution for those of us that may have problems with the current port assigned to DA.

The questions i have for those of you that have tried this or know about the consequenses:

I’ve heard that if anybody uses a different port, that server will not be able to have automatic updates installed.. How can I manually do this updates?

What about the plug-in. Will I still be able to use the plug-in feature from DA?

Any other important possible issue with this modification?

Thanks

Dec
 
Last edited:
Perhaps,
DA Support can step in here and set the record straight on this matter :)
 
rldev said:
Perhaps,
DA Support can step in here and set the record straight on this matter :)

I personally sent an email for support on this matter.

Dec
 
dec said:

I?ve heard that if anybody uses a different port, that server will not be able to have automatic updates installed.. How can I manually do this updates?

What about the plug-in. Will I still be able to use the plug-in feature from DA?

Hello,

You'd go to the Admin Panel -> License / Updates -> and click "Update" ;) We havn't forced an update in a while anyway, so you're not missing out on anything.

Anything that uses the API will have to change ports. As for plugins.. it depends on what they're doing, if they use the api, they'll need to change ports.

The idea of having 2 ports, one for http and one for https, has been on my mind for a while now. All it would really take is a fork early on in the startup, each one taking a different port. If I added that, it may help with the current perdicament you're having. I'll add it to the versions system and we'll if it works or not (if I run into any major issues, I might have to remove it from the list, I hope not ;))

John
 
I have the same problem with some customer. They are behind a firewall (company or university netword) or on such countries where IPSs arn't aware about panels usage.

One of my customers in this situation suggets the following:

<VirtualHost 1.2.3.4:80>
# Server configuration
##################################################################

ServerName xxx
ServerAlias xxx xxx.here.com
ServerAdmin [email protected]
DocumentRoot /WWW/
ErrorLog /WWW/logs/error_log
CustomLog /WWW/logs/access_log combined
ScriptAlias /cgi-bin/ "/opt/mon/cgi-bin/"

# Modules configuration
##################################################################

RewriteEngine On
RewriteRule ^/(.*)$ http://1.2.3.4:2222/$1 [P,L]
ProxyPassReverse / http://1.2.3.4:2222/
</VirtualHost>

So I can run DA on dedicated IP but all information from port 2222 are redirected on port 80 for this specific IP.

What to do you think about?
 
Ok..

I changed the directadmin.conf file to use port=xxxx.

I changed /var/www/html/redirect.php to use port=xxxx

I enabled port=xxxx on my firewall

I restarted directadmin, httpd and my firewall..

When i try and access:

http://domainname.com/config

I get:

connection refused when attempting to contact domainname.com:xxxx

Any ideas? am I missing something?

Dec
 
$IPTABLES -t nat -A PREROUTING -m tcp -p tcp --dport 8080 -j REDIRECT --to-port 2222
hostpc.com, louie55, max2000, unfortunately,
your solutions would'n work.

albatroz, there is no problems with cookies, AFAIK.

I have described this problem many monthes ago - here.

I also submitted detailed feature request in January 2005 to [email protected]:
===
After submitting login form, DA sends redirect header to browser:

Location: <protocol>://<hosname>:<port>/

Because of that we can't run DA on 2 or more ports simultaneously - it will always redirect browser to port and protocol defined in DA config file.

Maybe it's possible to change url in that header from absolute to
relative? Like this:

Location: /

If you do that, i beleive nothing changes in current way of DA
functionality.
But with that we will become able to map DA on any port and on any number of ports
...
===

(Of course, I didn't received any comments or reply ;)

Now, John intending to implement new "2-ports feature". Great, but I'm affraid they will too much hardcode again - and we still wouldn't able to map DA to 80 port on dedicated IP, for example.

Such a simple thing - replacing absolute urls with relative urls - may give DA so great flexibility - we'll even become able to implement "<any_number>-ports feature" by own hands completely ;)
 
Last edited:
Back
Top