|
| To
use the audio/video functionality of MSN Messenger (or Windows
Messenger, but I will use the former term in the rest of this article)
through a firewall, you need UPnP on your firewall. This article
explains how to add UPnP to your Linux kernel 2.4 based firewall (for
example SmoothWall 2). It took us some beers and a substantial amount of frustrating hours to collect the proper information and set it up. This article will turn frustrating hours into a handfull of happy minutes... Well, if you like beer. Some knowlegde about networking and Linux is required. We used WindowsXP and MSN Messenger beta-5, build 527, but it should also work with other Messenger versions. We're not sure if UPnP will work with other Windows versions (probably not, maybe there is an UPnP update available). |
Download javascript:downloadFile('/mnt/removable/www/html/articles/77/','/articles/77/','gateway-0.75.tgz','gateway-0.75.tgz')">gateway-0.75.tgz
or a newer version. LinuxIGD only works with kernel 2.4 (iptables). If
you are looking for something for kernel 2.2 (ipchains), check out http://pseudoicsd.sourceforge.net/.
LinuxIGD needs the http://upnp.sourceforge.net. Download upnpsdk-1.0.4.tar.gz or a newer version. Do not download the rpm, because you need to make some changes in the code.
... or forget the above and download our lready by RuweBit compiled files')">already by RuweBit compiled files !! Is compiled for kernel 2.4.17.
Copy the *.xml and *.skl files to /etc/linuxigd| mkdir /etc/linuxigd cp gateconnSCPD.xml /etc/linuxigd cp gatedesc.skl /etc/linuxigd cp gatedesc.xml /etc/linuxigd cp gateicfgSCPD.xml /etc/linuxigd cp gateinfoSCPD.xml /etc/linuxigd |
Copy the upnpd file to /usr/bin| cp upnpd /usr/bin |
Copy the *.o* files to /usr/lib| cp libupnp.so /usr/lib cp libstdc++-libc6.2-2.so.3 /usr/lib |
Create a symbolic link from /usr/sbin/iptables to the iptables program, for example:| ln -s /sbin/iptables iptables |
Add a route, as explained in the INSTALL of LinuxIGD. For example:| route add -net 239.0.0.0 netmask 255.0.0.0 int_if |
To start upnp, do:| upnpd ext_if int_if |
To stop upnp, do:| killall upnpd |
To check if upnp is running, do:| ps -x | grep upnpd |
Diagnostics| cat /var/log/messages | grep upnp |

In the same Network Connections dialog, go to the 'Advanced' menu and select 'Optional Networking Components'.
Select 'Networking Services' and press the 'Details' button.
Enable 'Universal Plug ' and press the 'Ok' button.
The previous dialog appera again, press the 'Next' button.
And now you have your personal Shu-shit-sju router. Or something. 

Is the route add necessary on each reboot?
What is a nice location to start upnp after a reboot?| Dutch E-mail from Maxim Baars De opzet die in je HOWTO staat is goed. Ik betwijfel of die Optional Network Components aangepast moet worden in XP. Volgens mij is de default instelling waarbij Internet Gateway Device Discovery and Control Client aan staat voldoende. Maar ik heb dit verder niet getest. Mijn omgeving is RH7.1 en ik heb zowel met Windows Messenger 4.7 als MSN Messenger 6.1 getest. Wat je nog mist zijn de rules voor het packet filter. Het volgende scriptje zou je als test kunnen gebruiken. Je kunt nog wat meldingen krijgen (als je logt), waarschijnlijk voor packets die geen RELATED of ESTABLISHED state hebben. (Dit veronderstelt de aanwezigheid van een rules als "... INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT" en "... FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT".) ## Test script # Check if UPnP daemon is already running # Note: daemon only inserts DNAT rules to client # Note: "/usr/bin/upnpd extif intif" can be added to /etc/rc.d/rc.local #if !(pidof upnpd); then if !( ps -ef | grep upnpd | grep -v grep >/dev/null ) ; then upnpd extif intif fi # Allow forwarding of UPnP packets (if policy is DROP) iptables -A FORWARD -p udp -i extif -o intif -j ACCEPT iptables -A FORWARD -p tcp -i extif -o intif -j ACCEPT # Allow multicast for UPnP # Note: "intif net 239.0.0.0 netmask 255.0.0.0" can be added to # /etc/sysconfig/static-routes route add -net 239.0.0.0 netmask 255.0.0.0 intif 2> /dev/null iptables -A INPUT -i intif -s intnet -d 239.255.255.250 -j ACCEPT # SSDP Discovery Service (SSDP protocol) iptables -A INPUT -i intif -p udp --dport 1900 -j ACCEPT # SSDP Discovery Service (SSDP event notification protocol) # Universal Plug and Play Device Host (UPNP protocol) iptables -A INPUT -i intif -p tcp --dport 2869 -j ACCEPT ## EOF Ik ben nog aan het overwegen of ik de upnpd-code zal aanpassen, want ik vind met name de forward rules te "open". Met vriendelijke groet, Maxim |
Last update notes
Update: Added a Dutch E-mail of Maxim Baars.