LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Port forwarding to internal machine (https://www.linuxquestions.org/questions/linux-networking-3/port-forwarding-to-internal-machine-5274/)

zamzara 08-09-2001 05:56 PM

Port forwarding to internal machine
 
I'm running WinMX (similar to Napster) on my PC, which is behind a Coyote firewall.

I can connect to other people OK, but when I need to accept an incoming connection it just times out.

On the firewall I have:

ipmasqadm autofw -r tcp 6699 6699 -h 192.168.10.67
ipmasqadm autofw -r udp 6257 6257 -h 192.168.10.67

(where obviously 192.168.10.67 is the private IP address of my PC)

and in WinMX I have specified tcp and udp ports for it to listen on to match those above.

Can anyone tell me why it doesn't work?

Cheers,

Tom

raz 08-10-2001 05:08 AM

Try a different syntax for this:

example:

ipmasqadm portfw -a -P tcp -L your_external_ip 6699 -R 192.168.10.67 6699
ipmasqadm portfw -a -P udp -L your_external_ip 6257 -R 192.168.10.67 6257

/Raz

zamzara 08-11-2001 06:29 AM

I tried this but it still does the same thing.

Are my ipchains rules important for this to work?

All I have is:

-P input ACCEPT
-P output ACCEPT
-P forward DENY
-A forward -i eth1 -j MASQ

so it's not very restrictive. Then the ipmasqadm commands are executed after the ipchains.

DavidPhillips 08-11-2001 03:51 PM

I am trying to do this also and I have installed ipmasqadm

This is what I get


ipmasqadm portfw -a -P udp -L external_ip 32766 -R 10.0.0.2 32766

portfw: setsockopt failed: Invalid argument

I have also tried this

# ipmasqadm autofw -A -r udp 32766 32809 -h 10.0.0.2 -v -
u
Adding autofwd udp ports 32766 - 32809 to fixed host 10.0.0.2
autofw: setsockopt failed: Invalid argument


Infra-R3d 08-12-2001 09:41 AM

If I remember correctly, there is a setting in WinMX that says you are behind a firewall and if you use that, people download the files from your box slightly differently (connection extablished throu ack packets with server rather than syn packets directly from the client), using this setting, you shouldnt need to touch your firewall settings.

zamzara 08-12-2001 07:15 PM

I think I've worked it out now, it's because ipchains was denying the packets before they got a chance to be forwarded by ipmasqadm.

You need to set the destination for the forward-packets to ACCEPT rather than MASQ or DENY.

jaco 11-30-2002 04:15 AM

winmx setup
 
Can someone please help me with setting up Winmx on my client pc and firewall? We use to have a dial-up connection, but now we are connecting thru a Linux Firewall. I`m not sure how to setup the firewall for this function. What is this port forwarding to client pc`s I read about?

DavidPhillips 11-30-2002 12:11 PM

This is a very old thread, and it's out dated. iptables is being used by most of the newer distros.


You should probably start a new thread for setting up winmx

RKris 12-01-2002 12:21 AM

Hi,
Switch to iptables!! Its simple

regards
krishna


All times are GMT -5. The time now is 06:46 PM.