Skip to content

Instantly share code, notes, and snippets.

@daveio
Created January 15, 2021 17:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daveio/73bdc21ff61ac2dabc9eeb513e62a025 to your computer and use it in GitHub Desktop.
Save daveio/73bdc21ff61ac2dabc9eeb513e62a025 to your computer and use it in GitHub Desktop.
dante sending socks requests out alternate interface
# get dante to use uid 'proxy' for priv and unpriv
# echo "201 fastlane" >> /etc/iproute2/rt_tables
ip rule add fwmark 0x1 table fastlane
ip route add default via 10.0.104.1 dev fastlane table fastlane
iptables -A OUTPUT -t mangle ! -d 10.0.101.0/24 -m owner --uid-owner proxy -j MARK --set-mark 1
iptables -t nat -A OUTPUT -m owner --uid-owner proxy -p udp --dport 53 -j DNAT --to 10.0.104.1:53
iptables -t nat -A OUTPUT -m owner --uid-owner proxy -p tcp --dport 53 -j DNAT --to 10.0.104.1:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment