Created
December 4, 2019 10:15
-
-
Save dimmaq/048fe73075e54ba80b5061541db84cfa to your computer and use it in GitHub Desktop.
redsocks working
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
# Generated by iptables-save v1.8.3 on Wed Dec 4 10:14:11 2019 | |
*nat | |
:PREROUTING ACCEPT [132:10921] | |
:INPUT ACCEPT [87:7317] | |
:OUTPUT ACCEPT [220:15238] | |
:POSTROUTING ACCEPT [59:4492] | |
:REDSOCKS - [0:0] | |
-A PREROUTING -i enp+ -p tcp -j LOG --log-prefix "pre_in: " | |
-A PREROUTING -i enp+ -p tcp -j REDSOCKS | |
-A POSTROUTING -o wlp+ -j MASQUERADE | |
-A POSTROUTING -s 10.0.0.0/24 -o wlp+ -j MASQUERADE | |
-A POSTROUTING -o wlp+ -j LOG --log-prefix "o_wlp: " | |
-A REDSOCKS -j LOG --log-prefix "redsocks: " | |
-A REDSOCKS -d 0.0.0.0/8 -j RETURN | |
-A REDSOCKS -d 10.0.0.0/8 -j RETURN | |
-A REDSOCKS -d 100.64.0.0/10 -j RETURN | |
-A REDSOCKS -d 127.0.0.0/8 -j RETURN | |
-A REDSOCKS -d 169.254.0.0/16 -j RETURN | |
-A REDSOCKS -d 172.16.0.0/12 -j RETURN | |
-A REDSOCKS -d 192.168.0.0/16 -j RETURN | |
-A REDSOCKS -d 198.18.0.0/15 -j RETURN | |
-A REDSOCKS -d 224.0.0.0/4 -j RETURN | |
-A REDSOCKS -d 240.0.0.0/4 -j RETURN | |
-A REDSOCKS -p tcp -j REDIRECT --to-ports 12345 | |
COMMIT | |
# Completed on Wed Dec 4 10:14:11 2019 | |
# Generated by iptables-save v1.8.3 on Wed Dec 4 10:14:11 2019 | |
*filter | |
:INPUT ACCEPT [773698:743053383] | |
:FORWARD ACCEPT [62:10647] | |
:OUTPUT ACCEPT [401494:721922647] | |
-A FORWARD -d 8.8.8.8/32 -p udp -j ACCEPT | |
-A FORWARD -s 10.0.0.0/24 -p udp -j DROP | |
COMMIT | |
# Completed on Wed Dec 4 10:14:11 2019 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment