Skip to content

Instantly share code, notes, and snippets.

@dgeibi
Created February 20, 2017 09:09
Show Gist options
  • Select an option

  • Save dgeibi/7db56c83d2d3747c97f32824a847fce3 to your computer and use it in GitHub Desktop.

Select an option

Save dgeibi/7db56c83d2d3747c97f32824a847fce3 to your computer and use it in GitHub Desktop.
ipset -N gfwlist iphash
#Telegram
ipset add gfwlist 91.108.56.0/22
ipset add gfwlist 91.108.4.0/22
ipset add gfwlist 109.239.140.0/24
ipset add gfwlist 149.154.160.0/20
#iptables
iptables -t nat -A prerouting_lan_rule -p tcp -m set --match-set gfwlist dst -j REDIRECT --to-port 1080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment