[miniupnpc] Added upnpc, a client side tool
Domingo Becker
beckerde at fedoraproject.org
Tue Mar 5 21:39:53 UTC 2013
commit 0e6f5dbaad1d87811fb6bd38c2c8696b8f681ec4
Author: Domingo Becker <domingobecker at gmail.com>
Date: Tue Mar 5 18:39:12 2013 -0300
Added upnpc, a client side tool
USAGE | 45 +++++++++++++++++++++++++++++++++++++++++++++
miniupnpc.spec | 15 ++++++++++++++-
2 files changed, 59 insertions(+), 1 deletions(-)
---
diff --git a/USAGE b/USAGE
new file mode 100644
index 0000000..9f76607
--- /dev/null
+++ b/USAGE
@@ -0,0 +1,45 @@
+Project: miniupnp
+Project web page: http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
+Author: Thomas Bernard
+Copyright (c) 2005-2011 Thomas Bernard
+This software is subject to the conditions detailed in the
+LICENSE file provided within this distribution.
+
+This file was contributed by Domingo Becker, domingobecker at gmail.com
+
+UPnPc usage
+===== =====
+
+From the command line:
+
+For listing all forwarded ports through UPnP in the current router:
+
+upnpc -l
+
+For adding a new port forward rule to the current router, for example,
+to forward tcp traffic on port 81 to internal ip port 80:
+
+upnpc -a 10.0.0.3 80 81 tcp
+
+You don't have to worry about overwriting previous rules, because the
+new ones will replace existing ones.
+
+If upnpc fails to add the rule, it may be because the port was added
+before in a static forwarding rule.
+
+Traffic on port 1900 is blocked by default on Fedora, and even if
+you open it, all traffic gets blocked because the nature of SSDP protocol.
+You will need to open incoming traffic from udp port 1900, because the
+packet sent to the router was from YourIP to 239.255.255.250 and the answer
+sent by the router is from RouterIP to YourIP. As a result, conntrack
+module can't track that kind of traffic and blocks all incoming answers.
+To add the iptables rule manually, do the following:
+
+iptables -I INPUT -p udp --sport 1900 -j ACCEPT
+
+You may also add this custom rule to system-config-firewall.
+
+I hope you enjoy.
+
+Domingo Becker
+
diff --git a/miniupnpc.spec b/miniupnpc.spec
index 67f5db6..5b8777b 100644
--- a/miniupnpc.spec
+++ b/miniupnpc.spec
@@ -4,7 +4,7 @@
Summary: Library and tool to control NAT in UPnP-enabled routers
Name: miniupnpc
Version: 1.6
-Release: 8%{?dist}
+Release: 9%{?dist}
License: BSD
Group: System Environment/Libraries
URL: http://miniupnp.free.fr/
@@ -18,6 +18,7 @@ Patch0: %{name}-1.6-files.patch
Patch1: %{name}-1.6-version.patch
# Link to and find libminiupnpc
Patch2: %{name}-1.6-tests.patch
+Source1: USAGE
%description
miniupnpc is an implementation of a UPnP client library, enabling
@@ -25,6 +26,9 @@ applications to access the services provided by an UPnP "Internet
Gateway Device" present on the network. In UPnP terminology, it is
a UPnP Control Point.
+This package includes upnpc, a UPnP client application for configuring
+port forwarding in UPnP enabled routers.
+
%package devel
Summary: Development files for miniupnpc
Group: Development/Libraries
@@ -47,6 +51,7 @@ This package contains python interfaces to %{name}.
%patch0 -p1
%patch1 -p1
%patch2 -p1
+cp %{SOURCE1} .
sed -i "s|\(\tpython setup.py install\)$|\1 --root=\$(DESTDIR)/|" Makefile
@@ -63,11 +68,13 @@ pushd build
make upnpc-shared all
popd
make pythonmodule
+make upnpc-shared
%install
make install DESTDIR=$RPM_BUILD_ROOT -C build
make DESTDIR=$RPM_BUILD_ROOT installpythonmodule
install -D -m644 man3/miniupnpc.3 $RPM_BUILD_ROOT/%{_mandir}/man3/miniupnpc.3
+install -D -m 0755 upnpc-shared $RPM_BUILD_ROOT%{_bindir}/upnpc
%check
make CFLAGS="%{optflags} -DMINIUPNPC_SET_SOCKET_TIMEOUT" check
@@ -81,6 +88,8 @@ make CFLAGS="%{optflags} -DMINIUPNPC_SET_SOCKET_TIMEOUT" check
%doc LICENSE
%doc README
%{_libdir}/libminiupnpc.so.%{major}
+%{_bindir}/upnpc
+%doc USAGE
%files devel
%{_includedir}/miniupnpc
@@ -92,6 +101,10 @@ make CFLAGS="%{optflags} -DMINIUPNPC_SET_SOCKET_TIMEOUT" check
%{python_sitearch}/miniupnpc.so
%changelog
+* Tue Mar 05 2013 Domingo Becker <domingobecker at gmail.com> - 1.6-9
+- Added upnpc, a client side tool, to the main package.
+- Added USAGE file with instructions on how to use upnpc.
+
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.6-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
More information about the scm-commits
mailing list