Jump to content

This is the support site for Andrews & Arnold Ltd, a UK Internet provider. Information on these pages is generally for our customers but may be useful to others, enjoy!

Ubuntu 16.04 Full Stack Configuration (with Bonding Config): Difference between revisions

No edit summary
 
== UPnP ==
UPnP is something I do have working, but for me it can be a little temperamental after a reboot, but usually starts working after a couple of minutes.
Coming soon.
 
We will use miniupnpd for this, and the configuration options are really quite minimal.
 
Firstly, install miniupnpd:
 
apt-get install miniupnpd
 
Next, edit '''/etc/default/miniupnpd''' and update it as follows (notice the commenting out of the OTHER_OPTIONS”). If you need UPnP for IPv6, don’t forget to also set the last option to “yes”:
 
# Set to 1 to start the daemon. Desactivated by default, because
# you don't want the outside to control your UPnP router, and
# as a consequence MiniUPnPd_LISTENING_IP should be set to a
# reasonable value before enabling the daemon.
START_DAEMON=1
# Define here the external interface connected to the WAN (eg: the public
# IP address NIC)
MiniUPnPd_EXTERNAL_INTERFACE="pppoe-AA_1"
# IP that the daemon should listen on.
# Note that you do *not* want this to be 0.0.0.0, as you don't want
# your MiniUPnPd to be controled by anyone on the internet.
MiniUPnPd_LISTENING_IP=”DEV_LAN”
# This defines other options which you might want to use when
# starting MiniUPnPd. Note that the -S option is important:
# -S sets "secure" mode : clients can only add mappings to their own ip
# (see man page)
#MiniUPnPd_OTHER_OPTIONS="-N -f /etc/miniupnpd/miniupnpd.conf"
MiniUPnPd_OTHER_OPTIONS=""
# If this option is defined, then the init script will initialize
# the ipv6 tables.
MiniUPnPd_ip6tables_enable=no
 
Once that’s done, you should be able to execute:
 
systemctl enable miniupnpd
systemctl start miniupnpd
 
We need to also restart miniupnpd when a PPP interface comes up or down. If we don’t do this, then miniupnpd will usually start at boot time before the PPP interface is connected, and this breaks the rules it puts in place.
 
Create a new file '''/etc/ppp/ip-up.d/fix-upnp''' with the following contents:
 
#!/bin/bash
/etc/init.d/miniupnpd restart
 
Then execute:
 
chmod 0755 /etc/ppp/ip-up.d/fix-upnp
chmod +x /etc/ppp/ip-up.d/fix-upnp
 
= Bonus: Port based policy routing to a third WAN =
12

edits