The OpenNET Project / Index page

[ новости /+++ | форум | wiki | теги | ]

Поиск:  Каталог документации

Next Previous Contents

5. DYNAMIC IP AREA (Dial-up or DHCP)

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

ppp_ip="`/sbin/ifconfig ppp0 | grep 'inet addr' | awk '{print $2}' | sed -e
/usr/sbin/ipmasqadm portfw -f
/usr/sbin/ipmasqadm portfw -a -P tcp -L ${ppp_ip} 6702 -R 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 6702
Of course the more machines using Napster behind your IPMasq'd machine the more port forwards you need to do.
Next Previous Contents

Inferno Solutions
Hosting by

Закладки на сайте
Проследить за страницей
Created 1996-2022 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру