Skip to content

Instantly share code, notes, and snippets.

@dcava
Forked from Meatballs1/gist:63b587212fb66c077039
Created November 22, 2015 12:22
Show Gist options
  • Save dcava/eca25c767a898df1e926 to your computer and use it in GitHub Desktop.
Save dcava/eca25c767a898df1e926 to your computer and use it in GitHub Desktop.
Wired to Wireless Synology DS213air bridging
# cat /usr/syno/etc.defaults/rc.d/S01iptables_nat.sh
# Script to enable port forwarding and IP Masquerading, to share
# the wireless connection to the ethernet port of ds213air
# e.g. computer -> eth0 -> diskstation -> wlan0 -> router -> interwebs
# Enable port forwarding, in case not enabled by default
echo 1 > /proc/sys/net/ipv4/ip_forward
# Load the required modules
/usr/syno/etc.defaults/rc.d/S01iptables.sh load_nat_mod forwarding_test
# Define the masquerading rule
/sbin/iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment