SS-NAT(1)

πŸ’… SS-NAT(1) β€” the glow-up ✨

okay so real talk, this is a page from the Shadowsocks-libev Manual, and bestie, it's about to make so much sense 🫢


🌸 NAME 🌸

ss-nat β€” the little helper script that sets up your NAT rules for transparent proxy. she's the backstage crew making the whole show work, no cap πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

ss-nat [-ouUfh] [-s <server_ip>] [-S <server_ip>] [-l <local_port>] [-L
<local_port>] [-i <ip_list_file>] [-a <lan_ips>] [-b <wan_ips>] [-w
<wan_ips>] [-e <extra_options>]

πŸ¦‹ DESCRIPTION πŸ¦‹

So. Shadowsocks-libev is a lightweight and secure socks5 proxy β€” icon behavior only πŸ‘‘. It's a port of the original shadowsocks created by clowwindy, and yes we stan the origin story. Shadowsocks-libev is written in pure C and takes advantage of libev to achieve both high performance and low resource consumption. literally the "works hard, barely eats" main character energy πŸ”₯

ss-nat(1) sets up NAT rules for ss-redir(1) to provide traffic redirection. that's the whole job, and she does it slayfully πŸ’…

⚠️ heads up bestie: she requires netfilter's NAT module and iptables(8). no iptables, no vibes.

for more info, check out shadowsocks-libev(8) and the EXAMPLE section down below ⬇️


✨ OPTIONS ✨

  • -s <server_ip> β€” the IP address of your shadowsocks remote server 🌐
  • -l <local_port> β€” the port number of your shadowsocks local server πŸ”Œ
  • -S <server_ip> β€” the IP address of your shadowsocks remote UDP server πŸ›°οΈ
  • -L <local_port> β€” the port number of your shadowsocks local UDP server πŸ“‘
  • -i <ip_list_file> β€” a file whose content is the bypassed ip list (basically the VIP guest list that skips the proxy πŸ™ˆ)
  • -a <lan_ips> β€” LAN IP of access control; heads up, she needs a prefix to define the access control mode 🏠
  • -b <wan_ips> β€” WAN IP that will be bypassed 🚫
  • -w <wan_ips> β€” WAN IP that will be forwarded ➑️
  • -e <extra_options> β€” extra options for iptables πŸ§ͺ
  • -o β€” apply the rules to the OUTPUT chain πŸ“€
  • -u β€” enable udprelay mode; TPROXY is required ⚠️ (fr fr, don't skip that part)
  • -U β€” enable udprelay mode, using different IP and ports for TCP and UDP πŸ”€
  • -f β€” flush the rules 🧹
  • -h β€” show this help message and exit πŸ‘‹

🌈 EXAMPLE 🌈

ss-nat requires iptables(8). here's the moment you've been waiting for, bestie:

# Enable NAT rules for shadowsocks,
# with both TCP and UDP redirection enabled,
# and applied for both PREROUTING and OUTPUT chains
root@Wrt:~# ss-nat -s 192.168.1.100 -l 1080 -u -o

# Disable and flush all NAT rules for shadowsocks
root@Wrt:~# ss-nat -f

first one? she's serving πŸ”₯ second one? the clean-up era 🧼✨


πŸ’œ SEE ALSO πŸ’œ

ss-local(1), ss-server(1), ss-tunnel(1), ss-manager(1), shadowsocks-libev(8), iptables(8), /etc/shadowsocks-libev/config.json

go read the whole fam, iykyk πŸ“šπŸ’…


okay that's the whole page!! πŸŽ€ this was Shadowsocks-libev 3.3.6, dated 10/11/2026 β€” so go set up those NAT rules and be the main character of your own network, periodt πŸ’–πŸ¦‹βœ¨