miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

raspberry pi and miniupnpd

 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Compilation/Installation
View previous topic :: View next topic  
Author Message
gandolf



Joined: 09 Sep 2014
Posts: 3
Location: openwrt

PostPosted: Tue Sep 09, 2014 6:17 pm    Post subject: raspberry pi and miniupnpd Reply with quote

Hi guys.
I wanted to know how i could compile the miniupnp daemon on the raspberry pi. I had some trouble with the install instructions. it seems the iptables script does not work properly.I am getting this error


pi@raspberrypi ~/miniupnpd-1.0 $ sudo ./netfilter/iptables_init.sh
External IP =
Bad argument `eth0'
Try `iptables -h' or 'iptables --help' for more information.
Bad argument `eth0'
Try `iptables -h' or 'iptables --help' for more information.


Also. Just to be clear, do i need to also compile the minissdp code as well?
Im not sure. thanks.

regards
gandolf
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1592

PostPosted: Thu Sep 11, 2014 1:42 pm    Post subject: Reply with quote

you don't need minissdpd.

you should edit iptables_init.sh so it works on your machine
$ ip -4 addr show eth0 | awk '/inet/ { print $2 }' | cut -d "/" -f 1
doesn't work for you apparently Smile
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
gandolf



Joined: 09 Sep 2014
Posts: 3
Location: openwrt

PostPosted: Thu Sep 11, 2014 3:06 pm    Post subject: Reply with quote

Hey, thanks. I must have been really tired cause i did forgot some small details. anyways. That line works. I had to change the EXTIF variable to wlan0, since thats how my device is connected.

The last line gives a bad argument error though

Bad argument `wlan0'

It is happenning on this line:
$IPTABLES -t filter -A FORWARD -i $EXTIF -o ! $EXTIF -j MINIUPNPD

I confirmed this by also trying to execute the commands manually. what exactly is the -o ! part doing?

I have other issues when trying to compile miniupnpd on raspberry. Apparently the linux source headers arent included so i get compilation errors of iptables.h not found. Sad

regards
gandolf
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1592

PostPosted: Fri Sep 12, 2014 1:07 am    Post subject: Reply with quote

man iptables
Code:

       [!] -o, --out-interface name
              Name of an interface via which a packet is going to be sent (for
              packets entering the FORWARD, OUTPUT  and  POSTROUTING  chains).
              When  the  "!"  argument  is used before the interface name, the
              sense is inverted.  If the interface name ends in  a  "+",  then
              any  interface  which begins with this name will match.  If this
              option is omitted, any interface name will match.


_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
gandolf



Joined: 09 Sep 2014
Posts: 3
Location: openwrt

PostPosted: Sun Sep 14, 2014 7:39 pm    Post subject: Reply with quote

ok just in case someone else has an issue. The problem seems to be the positioning of the command options. I swapped the -o and ! and the script works fine now. The new command should look like this:

$IPTABLES -t filter -A FORWARD -i $EXTIF ! -o $EXTIF -j MINIUPNPD

Now to find out how i can fix the iptables.h not found error on the Pi.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Compilation/Installation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.