Koozali.org: home of the SME Server

Legacy Forums => Experienced User Forum => Topic started by: John on October 17, 2003, 04:44:57 PM

Title: Port Open + Forward
Post by: John on October 17, 2003, 04:44:57 PM
I have 5.6 installed server / gateway.  I want to open and forward port 2345 and 3389 to my Windows Server on my local network.  Is this the correct syntax..because it ISN'T WORKING for me.  Thank you.

 /sbin/ipchains --append input -p tcp -s 0/0 -d $OUTERNET 2345 -j ACCEPT
    /sbin/ipchains --append output ! -y -p tcp -d 0/0 -s $OUTERNET 2345 -j
ACCEPT
    ipmasqadm portfw -a -P tcp -L $OUTERNET 2345 -R 172.16.1.2 25

 /sbin/ipchains --append input -p tcp -s 0/0 -d $OUTERNET 3389 -j ACCEPT
    /sbin/ipchains --append output ! -y -p tcp -d 0/0 -s $OUTERNET 3389 -j
ACCEPT
    ipmasqadm portfw -a -P tcp -L $OUTERNET 3389 -R 172.16.1.2 25

I have them in /etc/e-smith/templates-custom/etc/rc.d/init.d/masq with one named 45AllowTS and 45AllowTW

I then do a "/sbin/e-smith/signal-event remoteaccess-update" and it is as thou I accomplished nothing.

I know this is a worn out topic and after spending 4 days searching and using many variations, I still can't get it working.

Thanks guys,
John
Title: Re: Port Open + Forward
Post by: Byte on October 17, 2003, 04:52:47 PM
Why dont you use the Port Open Contrib found over at http://wiki.contribs.org
Title: Re: Port Open + Forward
Post by: John on October 17, 2003, 05:19:01 PM
One of the many things i tried that did not function.
Title: Re: Port Open + Forward
Post by: Byte on October 17, 2003, 05:46:32 PM
one thing I can see why it doesnt work is that you are using ipchains when 5.6 is iptables
Title: Re: Port Open + Forward
Post by: John on October 17, 2003, 06:28:24 PM
do i just change replace all "ipchains" with "iptables" ??
Title: Re: Port Open + Forward
Post by: Michael Smith on October 17, 2003, 09:10:43 PM
Strange that the portforwarding contrib didn't work for you ... it's worked for me, and for many others.  You might consider upgrading to 6.0b3 ... it has portforwarding built in.
Title: Re: Port Open + Forward
Post by: Charlie Brady on October 17, 2003, 09:30:38 PM
John wrote:

> One of the many things i tried that did not function.

Not surprising since (as I keep saying) the Port Opening contrib does nothing useful.

Use (the correct version of) the port forwarding add-on. It'll open and forward the ports that you tell it to. As Michael says, 6.0beta includes port forwarding in the manager.

Charlie
Title: Re: Port Open + Forward
Post by: John on October 17, 2003, 09:41:10 PM
Charlie Brady wrote:
>
> John wrote:
>
> > One of the many things i tried that did not function.
>
> Not surprising since (as I keep saying) the Port Opening
> contrib does nothing useful.
>
> Use (the correct version of) the port forwarding add-on.
> It'll open and forward the ports that you tell it to. As
> Michael says, 6.0beta includes port forwarding in the manager.
>
> Charlie

I would love to run the beta, a matter of fact I intalled it twice.. 6.3 all updates... I have a problem with that too.. didn't try the port forwarding.. LISTEN to this:

I host multiple domains/websites.  No matter which of my urls I through in the browser I get the primary or default domain/ibay displaying its html.  

Anyone?
Title: Re: Port Open + Forward
Post by: Michael Soulier on October 17, 2003, 10:21:57 PM
John wrote:
>
> I would love to run the beta, a matter of fact I intalled it
> twice.. 6.3 all updates... I have a problem with that too..
> didn't try the port forwarding.. LISTEN to this:
>
> I host multiple domains/websites.  No matter which of my urls
> I through in the browser I get the primary or default
> domain/ibay displaying its html.

After installing 6.0b3, (there is no 6.3) you should apply all updates. We fixed that problem some time ago.

Mike
Title: Re: Port Open + Forward
Post by: Klaus Eckert on October 18, 2003, 05:20:43 AM
why so complicated?
first: do not change any config-files manually, modify the templates instead.
second: the portopening/portforwarding-contribs work fine for me.
third: if you open a port, you have to forward it too

cheers klaus
Title: Re: Port Open + Forward
Post by: Alejandro Lengua on October 18, 2003, 07:22:23 AM
mm...
I have installed portforwarding and packetfiltering in my SME 5.6 BOX
and it seems to be not working yet. The interface panel works, however
it seems to be not redirecting any traffic at all.

I am trying to forward ports 25,110, and 80; and I have also installed the
contrib that allows to stop unwanted services. The reason of this was
to keep included smtp/pop3 services from answering to those ports.

I would use SME 6 Beta, but I need to route a second "local"
LAN to Internet, as well as make use of PPTP service and SARG reports,
and I am afraid that the current available contribs are not compatible with
SME 6.0

Any suggestions?

Regards
Alejandro Lengua
Title: Re: Port Open + Forward
Post by: Klaus Eckert on October 18, 2003, 07:49:04 PM
Alejandro Lengua wrote:
>
> mm...
> I have installed portforwarding and packetfiltering in my SME
> 5.6 BOX
> and it seems to be not working yet. The interface panel
> works, however
> it seems to be not redirecting any traffic at all.

use the port-opening contrib to open the port.
you cannot forward a port that is not opened.
Title: Re: Port Open + Forward
Post by: Alejandro Lengua on October 18, 2003, 08:34:10 PM
I am trying to forward ports 25 and 110 that are supposed to be open
by default.

I wonder if it is necessary to run this
/sbin/e-smith/signal-event post-upgrade

I don´t remember having done so.
Title: Re: Port Open + Forward
Post by: Alejandro Lengua on October 18, 2003, 08:52:04 PM
I found some documentation for SME55, and it seems to be simpler on SME,
just do something like this

>>>>>>>>>>

SME 5.5

Use port forwarding to forward traffic from the relevant TCP/UDP ports
from the SME box to a PC inside your own network.

[root@e-smith ]# ipmasqadm portfw -a -P tcp -L SME_IP  4661 -R PC_IP 4661
[root@e-smith ]# ipmasqadm portfw -a -P tcp -L SME_IP  4662 -R PC_IP 4662
[root@e-smith ]# ipmasqadm portfw -a -P tcp -L SME_IP  4663 -R PC_IP 4663
[root@e-smith ]# ipmasqadm portfw -a -P udp -L SME_IP  4665 -R PC_IP 4665

List your port forwardings to make sure that your entered the information
correctly.
Title: Re: Port Open + Forward
Post by: Alejandro Lengua on October 19, 2003, 12:47:44 AM
Yes SME 6,  includes port-forwarding however it seems that it don´t forward
ports 80, 25 and 110.
Title: Re: Port Open + Forward
Post by: Michael Soulier on October 19, 2003, 07:18:11 AM
Alejandro Lengua wrote:
>
> Yes SME 6,  includes port-forwarding however it seems that it
> don´t forward
> ports 80, 25 and 110.

It should. Note that portforwarding only works on traffic arriving on the external interface.

Mike
Title: Re: Port Open + Forward
Post by: Alejandro Lengua on October 23, 2003, 10:46:58 PM
I wonder if the port-opening contrib has any effect on the PPTP VPN
feature.