From juansm at fibertel.com.ar Tue Aug 5 08:40:35 2003 From: juansm at fibertel.com.ar (Juan Salvador) Date: Tue, 5 Aug 2003 12:40:35 -0300 Subject: [NARC] Dynamic IP & Custom Conf Variables Message-ID: <000001c35b67$eb6108f0$0500a8c0@sagitario> Hi! I'm new to the list. I'm running narc in my home gateway, under slack 9. My question is, How can I properly use variables in narc-custom.conf so that if my EXT_INT_IP changes I don't have to perform the annoying task of modifying every single line (there are many... trust me) in which my ext. ip is mentioned? The main config as well as the port forwarding options seem to be working allright. However, as 3 of my home terminals run under win32 platforms, I need some custom commands due to program specifications which narc-forward can't address. My cablemodem provider gives me only one dynamic IP, and it's such a fuzz when it changes and programs based on port forwarding stop working or loose performance. I've noticed the following in the main script, regarding the EXTERNAL_INTERFACE_IP variable related to the FORWARD_CONF variable: if [ "$PORT_FORWARD" == 'yes' ] ; then for var in `grep -v "^ *#" $FORWARD_CONF | strings` ; do PROTOCOL=`$ECHO $var | cut -d \" -f2` ORIG_IP=`$ECHO $var | cut -d \" -f4` ORIG_PORT=`$ECHO $var | cut -d \" -f6` NEW_IP=`$ECHO $var | cut -d \" -f8` NEW_PORT=`$ECHO $var | cut -d \" -f10` if [ "$ORIG_IP" == 'AUTOGET_EXTERNAL_IP' ] ; then ORIG_IP="$EXTERNAL_INTERFACE_IP" My question is, then: Is there any way in which I can use EXTERNAL_INTERFACE_IP in my narc-custom.conf ? If no, then is there a way in which I can declare a variable in the narc-custom script and then use it along the rest of it? Thank you so much for your attention and SALUDOS DESDE ARGENTINA !!! Juan Salvador Mayedonchi juansm at fibertel.com.ar -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.knowplace.org/pipermail/narc/attachments/20030805/6130f001/attachment-0001.htm From j.brosens at chello.nl Thu Aug 21 04:18:59 2003 From: j.brosens at chello.nl (Jeroen Brosens) Date: Thu, 21 Aug 2003 13:18:59 +0200 Subject: [NARC] Unable to do portforwarding on Debian? Check if you have binutils (strings) installed! Message-ID: <000301c367d6$047fea20$0200a8c0@thunderbird> For the past few days I have been struggling with setting up port forwarding and found out that on a clean install of Debian 3.0r1 (without binutils), the file /usr/bin/strings is missing, and that is what NARC needs (for extracting the port forwarding lines from the narc-forward.conf). If you open the narc script, do a search for 'strings'; you'll find the port-forwarding section here. During a 'narc start' I got the message "/usr/sbin/narc: strings: command not found" and then NARC tells me "No ports to forward! Check your /etc/narc/narc-forward.conf" and it bombs out with a "Something bad happened!". It took me quite some time to find out by chance that when I apt-getted binutils, the error was gone. Binutils installs the /usr/bin/strings file that is needed. Btw, I mentioned this to Shane Chen and he said he will make sure a check for this is incorporated in the next release. Kind regards from the Netherlands, Jeroen Brosens -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.knowplace.org/pipermail/narc/attachments/20030821/c27da116/attachment.htm From support at earthtravel.net Thu Aug 21 19:19:23 2003 From: support at earthtravel.net (support at earthtravel.net) Date: Thu, 21 Aug 2003 19:19:23 -0700 Subject: [NARC] How to let a private IP address in? In-Reply-To: <20030821132704.15857.25742.Mailman@moles> Message-ID: <5.2.1.1.0.20030821191808.01885f10@mail.earthtravel.net> How can I let a private IP address in lets say 192.168.2.5? I have tried to let it in via the custom script iptables -I TCP_CHK 3 -p tcp -s 192.168.2.5 -i eth0 -j ACCEPT It seems to have already been dropped by the Anti Spoofing rule by the time the custom script rules apply. Thanks. -mag -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.knowplace.org/pipermail/narc/attachments/20030821/12e6a5ed/attachment-0001.htm