Koozali.org: home of the SME Server

Nathan Fowler plz read

TwiLight

Nathan Fowler plz read
« on: September 26, 2002, 10:48:08 PM »
http://forums.contribs.org/index.php?topic=15130.msg58092#msg58092

is this right... is this the thinghy i was trying all along... coz i tried and tried and tried and i didnt get it to work (manual and auto) can u help me out.

(not by giving the adress of that website offcourse :))

TwiLight

Re: Nathan Fowler plz read
« Reply #1 on: September 26, 2002, 10:59:02 PM »
i want to use port forwarding on port 2000
ip 212.204.137.181 at port 2000 should be port forwarding to my xp pc

aslo i would like to be able to use remote control for xp trough the sme server
can u help me out...

i want to use msn web news and all the other standard stuff... but also DC plus plus , SSH and REMOTE CONTROL for XP (the one build in)

Nathan Fowler

Re: Nathan Fowler plz read
« Reply #2 on: September 27, 2002, 12:50:42 AM »
Haha, I was asked for by name, my I am popular...

There are several options you may use, one includes a separate binary called "redir".  This binary is often useful, as portfw will only operate on a specific interface, and some have noted that it has trouble forwarding lower port numbers.  A good site to check out would be http://www.tsmservices.com/masq

If you wish to redir let me know, it's pretty easy to master and powerful.

Hope this helped,
Nathan

TwiLight

Re: Nathan Fowler plz read
« Reply #3 on: September 27, 2002, 12:58:43 AM »
lol ;)

redir tell me about it plz :)

i want to have 192.168.27.65 (internal network) open to the outside
a program of AnalogX (simpleserver) is running on it

the server ip = 212.204.137.181 and the port i would like to use for redirring = 2000
so if i would to say I WANNA SEE THE WEBPAGE ON 192.168.27.65
that i can call it on 212.204.137.181:2000

plz give me a direct howto ;) so i can type it in very easy
im kinda UNFAMILIAR with "networking opts" but do know stuff about programming in LinUx ;) lol thats why i ask u it this way

Nathan Fowler

Re: Nathan Fowler plz read
« Reply #4 on: September 27, 2002, 01:04:20 AM »
You can download redir at:
http://www.stickit.nu/utils/redir-i386-2.2.1.tgz

Download the program, copy the .tgz to /root. I am going to assume you want to foward 2000 to port 80 on 192.168.27.65, so do the following:

From Console:
cd /root
wget http://www.stickit.nu/utils/redir-i386-2.2.1.tgz
tar -zxvf redir*.tgz
chmod 755 redir
mv redir /usr/local/bin/redir

You have now "installed" redir. To execute Redir issue the following command:

redir --lport=2000 --laddr= --cport=80 --caddr=192.168.27.65 --transproxy

This will redirect 2000 on the external interface to 80 on the internal interface to 192.168.27.65. This should allow you to access the website on 192.168.27.65 by typing:

http://212.204.137.181:2000

For a list of command-line options for redir please see:
http://forums.contribs.org/index.php?topic=5233.msg18479#msg18479

Hope this helped,
Nathan

TwiLight

Re: Nathan Fowler plz read
« Reply #5 on: September 27, 2002, 02:58:48 AM »
It does work right now... though.. can u give me a way around this program
i mean can u surpass the program and tell me how to enhance the settings of SME  with the settings i gave u...

i know that i am asking a lot though could u plz do so...
i was very glad with the program... it did satisfy me.. though when i looked in the programs HEX CODE i noticed that it can be done else..

PLZ write this way for me on paper

port 2000 212.204.137.181 t0 port 80 192.168.27.65
btw.. i auto run dloos udp at the moment...

Nathan Fowler

Re: Nathan Fowler plz read
« Reply #6 on: September 27, 2002, 04:21:58 AM »
The alternative would be using ipmasqadm portfw, however, that's the exact program you were using that you were having problems with (based on the thread you posted above).  There's nothing wrong with redir, I use it often myself.

Nathan

TwiLight

Re: Nathan Fowler plz read
« Reply #7 on: September 27, 2002, 11:30:01 AM »
yes thats true... but perhaps i did something wrong :)

thats why i want to know if u could write down the lines for ipbladiebladie ;)
based on a empty sme server with 2 nics ;)

Bill Talcott

Re: Nathan Fowler plz read
« Reply #8 on: September 28, 2002, 12:45:51 AM »
If you have the port forwarding RPM installed, you should just need to go to the Server Manager, and tell it to forward external port 2000 to port 80 on 192.168.27.65. I have absolutely no experience with 5.5, so I can't comment on the issues with 5.5 and port forwarding.

As for the other apps, you just need to do the same thing, kind of. You just need to figure out which ports those apps use and tell it forward those ports to that same port on 192.168.27.65. Some programs, like most of the IM programs' file transfer stuff, use dynamic port numbers. You'll have to go into the program, and specifically tell it to use a certain port(s) as well.

Karsten K Sommer

Re: Nathan Fowler plz read
« Reply #9 on: October 01, 2002, 11:22:25 AM »
Hi Natham..

I have the same problem as TwiLight, I can forward my ports.

I have installede the redir as you described, but I think i did something wrong.

I want to move my incomming at port 80 to be forwarded to my win2k server, locaded at 192.168.0.5, also port 80.

What commandline should I use ?

Karsten K Sommer

Re: Nathan Fowler plz read
« Reply #10 on: October 01, 2002, 11:22:27 AM »
Hi Natham..

I have the same problem as TwiLight, I can forward my ports.

I have installede the redir as you described, but I think i did something wrong.

I want to move my incomming at port 80 to be forwarded to my win2k server, locaded at 192.168.0.5, also port 80.

What commandline should I use ?

at local fill in your lo

Re: Nathan Fowler plz read
« Reply #11 on: October 01, 2002, 12:14:37 PM »
fill local ip in at localip its discribed in their somewhere,... though u need to give up where 212......  is ethernet and the other adrr.. their u should put you rown ip *(local)*

Nathan Fowler

Re: Karsten K Sommer
« Reply #12 on: October 01, 2002, 06:18:38 PM »
redir --lport=80 --laddr= --cport=80 --caddr=192.168.0.5 --transproxy

This will redirect 80 on the external interface to 80 on the internal interface to 192.168.0.5. This should allow you to access the website on 192.168.0.5 by typing:

http://

Note that redir cannot bind to a port in use, since TCP 80 is being used for httpd on the e-smith server, it is necessary to shut that service down.  Note that http is not httpd-admin.

/etc/rc.d/init.d/httpd stop

Hope this helped,
Nathan

Karsten K Sommer

Re: Nathan
« Reply #13 on: October 02, 2002, 12:41:31 AM »
Hi...

So far so good :-)

Now I have stopped the http server and use the command
redir --lport=80 --laddr=80.198.0.92 --cport=80 --caddr=192.168.0.5 --transproxy

... and nothing happens... No comments from the server.

Now I can't do nothing. I can write, but its like typing in Word.
No matter want I writem nothing happens.

So I restart, and start all over again.. but the same problem happened.

Can you help me ?.. I have thought about installing the earlier version, where the Port Forwarding system works in SME admin... what do you think
;o)

Karsten K Sommer

Re: Nathan
« Reply #14 on: October 02, 2002, 12:41:37 AM »
Hi...

So far so good :-)

Now I have stopped the http server and use the command
redir --lport=80 --laddr=80.198.0.92 --cport=80 --caddr=192.168.0.5 --transproxy

... and nothing happens... No comments from the server.

Now I can't do nothing. I can write, but its like typing in Word.
No matter want I writem nothing happens.

So I restart, and start all over again.. but the same problem happened.

Can you help me ?.. I have thought about installing the earlier version, where the Port Forwarding system works in SME admin... what do you think
;o)

Nathan Fowler

Re: Nathan
« Reply #15 on: October 02, 2002, 12:49:09 AM »
Background the process by putting '&' at the end.

redir --lport=80 --laddr=80.198.0.92 --cport=80 --caddr=192.168.0.5 --transproxy &

Karsten K Sommer

Re: Nathan
« Reply #16 on: October 02, 2002, 02:57:59 AM »
Hi again..

Ok, now it's looking better..

But I made a mistake, when typing the line... I wrote 192.168.2 insead of 192.168.0.2... upz..

And now I can't change it... and I can't overwrite it :-(

Is their a delete commando or ??

Nathan Fowler

Re: Nathan
« Reply #17 on: October 02, 2002, 05:30:46 AM »
You're executing a program so there is nothing to be overwritten.  To kill all running redir processes type:

"console>" designates the linux console, commands here should be typed exactly, including all punctuation.

console>kill ps -aux --cols=900|grep redir|awk '{print $2}'

This should kill the process, then you can type the line over and correct your spelling mistakes.  If you're locked in the process you can hit CTRL-C to terminate.

Hope this helped,
Nathan

Karsten K Sommer

Re: Nathan
« Reply #18 on: October 05, 2002, 12:40:08 AM »
Hi Again..

Now I have installed the previus version af SME... 5.1.2.
and installed Port Forward

Now..
I have crated 2 forwards..
UTP port 80 to 192.168.0.5 port 80
and
TCP port 80 to 192.168.0.5 port 80

Is that OK.. i guess so :-)

Now.. what should I do to make i work ?.. Should I uninstall the HTTP server or stop it ?

TwiLight - School

Re: Nathan
« Reply #19 on: October 05, 2002, 02:40:05 AM »
Well... its very simple... edit (mcedit or whatever u wanna use...)httpd.conf
somewhere in the file is a listen to port area.. put this to some port u will never use ;like 9999 or something... this is a lot less difficult and radical... a other way u could use is prevent apache for starting at boot... the last option is for u to find out yourslef