For information about Napster, please see their website at Napster Homepage
In order to allow Napster to work correctly, you will need to put a hole in the IP Masq'd system. This inherently presents potential security problems. Unfortunately I cannot accept responsibility for this hack. So if you do this, and you get burned because of it...not my fault. Great...now lets get into it...
After setting up a network for my roommates and I, the problem arose that were not able to use Napster because of the IPMasquerading I was doing. So I put some time into and came up with this solution to the problem. I hope it works for you like it did for me...but I can't promise anything.
I have tested this solution with the following variables:
First off, ensure that you have the version (or newer) as listed above in the previous section. Also be sure they are installed correctly.
The following lines pass the connection to the Napster clients running on the hosts behind your IPMasq'd system. (add them to the startup file - you'll need to one command for each host using Napster) /usr/sbin/ipmasqadm portfw -a -P tcp -L xxx.xxx.xxx.xxx 6702 -R 192.168.1.2 6702 /usr/sbin/ipmasqadm portfw -a -P tcp -L xxx.xxx.xxx.xxx 6703 -R 192.168.1.3 6703 /usr/sbin/ipmasqadm portfw -a -P tcp -L xxx.xxx.xxx.xxx 6704 -R 192.168.1.4 6704 /usr/sbin/ipmasqadm portfw -a -P tcp -L xxx.xxx.xxx.xxx 6705 -R 192.168.1.5 6705 Note: XXX.XXX.XXX.XXX is the IP address of the Linux IPMasqing system (the Internet IP).Note: If you are having problems with IPMASQADM or IPMasquerading in general see the IPMASQ-HOWTO. This document is provided to help people who have their systems configured. The IPMASQ-HOWTO will get into a deeper discussion of port forwarding and IPMasq'd in general.
See this and the Procedure section if your IP address changes everytime you connect to the internet.
Thanks to Peter Illmayer for the following submission to me: (This will work out best for those of you with dynamic IP's...)
------------------------------------------------------------ IN debian, I created a forward file in /etc/ppp/ip-up.d and put in #!/bin/sh ppp_ip="`/sbin/ifconfig ppp0 | grep 'inet addr' | awk '{print $2}' | sed -e 's/.*://'`" /usr/sbin/ipmasqadm portfw -f /usr/sbin/ipmasqadm portfw -a -P tcp -L ${ppp_ip} 6702 -R 192.168.0.2 6702 This is in a 2.2.x kernel with ipmasqadm installed with the appropriate kernel modules compiled in. ---------------------------------------------------------------Charles J. Fisher pointed out that a similar script can be used if you are using DHCP, insert the following lines in a script that runs after you get your IP address.
net_ip="`ifconfig eth0 | awk '/inet/ {sub(/addr:/,"",$2); print $2}'`" /usr/sbin/ipmasqadm portfw -f /usr/sbin/ipmasqadm portfw -a -P tcp -L ${net_ip} 6702 -R 192.168.1.2 6702Of course the more machines using Napster behind your IPMasq'd machine the more port forwards you need to do.
This system will allow Napster to operate properly behind an IPMasq'd system. Hopefully it works for you as well as it does for me! Please direct comments/suggestions/flames to jed204@psu.edu
This is the initial version of this document. Very rough. If the interest is out there and things changes, so will this document. If anyone else has a solution they think is better...please, all means, let me know and we can discuss what the best solution possible is.
Copyright (c) 2000 by John E. Danner
Please freely copy and distribute (sell or give away) this document in any format. It's requested that corrections and/or comments be fowarded to the document maintainer. You may create a derivative work and distribute it provided that you:
1.Send your derivative work (in the most suitable format such as sgml) to the LDP (Linux Documentation Project) or the like for posting on the Internet. If not the LDP, then let the LDP know where it is available.
2.License the derivative work with this same license or use GPL. Include a copyright notice and at least a pointer to the license used.
3.Give due credit to previous authors and major contributors.
If you're considering making a derived work other than a translation, it's requested that you discuss your plans with the current maintainer.