This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# in /etc/sysctl.conf | |
# net.ipv4.ip_forward=1 | |
echo 1 > /proc/sys/net/ipv4/ip_forward | |
iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT | |
iptables -A FORWARD -s 10.8.0.0/24 -j ACCEPT | |
iptables -A FORWARD -j REJECT | |
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh /etc/rc.common | |
# Copyright (C) 2006-2011 OpenWrt.org | |
# | |
# Shadowsocks startup script with iptables rules for OpenWrt | |
# | |
# This file is located in directory /etc/init.d/ | |
# rename this file to shadowsocks before using it | |
# | |
# By Lance http://www.shuyz.com | |
# |