View previous topic :: View next topic |
Author |
Message |
gandolf
Joined: 09 Sep 2014 Posts: 3 Location: openwrt
|
Posted: Tue Sep 09, 2014 6:17 pm Post subject: raspberry pi and miniupnpd |
|
|
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 |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1592
|
Posted: Thu Sep 11, 2014 1:42 pm Post subject: |
|
|
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 _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
gandolf
Joined: 09 Sep 2014 Posts: 3 Location: openwrt
|
Posted: Thu Sep 11, 2014 3:06 pm Post subject: |
|
|
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.
regards
gandolf |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1592
|
Posted: Fri Sep 12, 2014 1:07 am Post subject: |
|
|
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 |
|
|
gandolf
Joined: 09 Sep 2014 Posts: 3 Location: openwrt
|
Posted: Sun Sep 14, 2014 7:39 pm Post subject: |
|
|
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 |
|
|
|