Koozali.org: home of the SME Server

port forwarding

Markus Schmuck

port forwarding
« on: March 15, 2001, 05:05:39 PM »
I looked in the forum and found some postings without replys.

Therefore I´m posting this question again. How can I redirect incomming trafic on port 80 of the e-smith-pc to port 80 of a pc in my local network?

Thanks,
Markus

thrruss

Re: port forwarding
« Reply #1 on: March 15, 2001, 08:19:47 PM »
You must search for ipchains.
With ipchains you can establish rules to forward whatever you want to where you want.
For example:
    /sbin/ipchains --append forward -j MASQ --source 192.168.0.0/255.255.255.0 --destination 0.0.0.0/0 80
 will forward all incoming requests to your 192.168.0.0 network.

With that I think that you'll find the rest of the solution alone.
Good work!
If you know the solution of my problem (samba problem):
http://www.e-smith.org/bboard//read.php?f=3&i=3059&t=3059
thanks

Jochen Hoegerl

Re: port forwarding
« Reply #2 on: March 15, 2001, 08:38:54 PM »
Hi Markus,

what you need to do is setup your e-smith Apache to use

"ProxyPass"

You can find a good article about setting this up at:

www.linuxfocus.org/Deutsch/March2000/article147.shtml

this article is also available in "en".


jochen

David Helmuth

Re: port forwarding
« Reply #3 on: March 18, 2001, 09:39:08 AM »
Thanks for the help, but I am a pretty new to ipchains.  I tried a quick change to what you outlined

 /sbin/ipchains --append forward -j MASQ --source 192.168.1.0/255.255.255.0 --destination 192.168.1.2/255.255.255.0 80

and got the following message:

/sbin/ipchains: can only specify ports for icmp, tcp or udp

All I am trying to do is say that all outside traffic on port 80 goes to some machine other than the e-smith server.

My installation VERY basic e-smith 4.1 if that helps.

Any help would be appreciated!

Thanks again.

fun

Re: port forwarding
« Reply #4 on: March 18, 2001, 09:12:30 PM »
Yup, I got the same message.
I run a terminal server on an NT box and wanted to try forwarding the traffic to it (hey, I am just trying!).

Anyone has any ideas or a quick way to forward ports ?

Thanx! :-)

Franck ZOCCOLO

Re: port forwarding
« Reply #5 on: March 19, 2001, 10:54:49 AM »
That's easy...
Let's suppose that you have your WEB server  at 192.168.66.15 port 80
"ExternalIP" is your public IP

ipmasqadm portfw -a -P tcp -L ExternalIP 80 -R 192.168.66.15 80

ipmasqadm portfw --help for more details

Markus Schmuck

Re: port forwarding
« Reply #6 on: March 26, 2001, 01:12:52 AM »
It looks really easy, but in which script do you insert it. I read the infos about customising e-smith, but I´m not really sure how it works.

Which script is the right for these lines and how can I get them in?

thanks,
Markus