darkk / redsocks

transparent TCP-to-proxy redirector
http://darkk.net.ru/redsocks
3.33k stars 862 forks source link

redsocks not working. #139

Open namnntt opened 5 years ago

namnntt commented 5 years ago

Hello, im trying install redsocks on Openwrt, and i use setting firewall at https://github.com/tominescu/luci-app-redsocks,

Add redir rules

iptables -t nat -N REDSOCKS iptables -t nat -A PREROUTING -p tcp -j REDSOCKS iptables -t nat -A OUTPUT -p tcp -j REDSOCKS

bypass local domain

iptables -t nat -A REDSOCKS -d $proxy_ip -j RETURN iptables -t nat -A REDSOCKS -d 0.0.0.0/8 -j RETURN iptables -t nat -A REDSOCKS -d 10.0.0.0/8 -j RETURN iptables -t nat -A REDSOCKS -d 100.64.0.0/10 -j RETURN iptables -t nat -A REDSOCKS -d 127.0.0.0/8 -j RETURN iptables -t nat -A REDSOCKS -d 169.254.0.0/16 -j RETURN iptables -t nat -A REDSOCKS -d 172.16.0.0/12 -j RETURN iptables -t nat -A REDSOCKS -d 192.0.0.0/24 -j RETURN iptables -t nat -A REDSOCKS -d 192.0.2.0/24 -j RETURN iptables -t nat -A REDSOCKS -d 192.88.99.0/24 -j RETURN iptables -t nat -A REDSOCKS -d 192.168.0.0/16 -j RETURN iptables -t nat -A REDSOCKS -d 198.18.0.0/15 -j RETURN iptables -t nat -A REDSOCKS -d 198.51.100.0/24 -j RETURN iptables -t nat -A REDSOCKS -d 203.0.113.0/24 -j RETURN iptables -t nat -A REDSOCKS -d 224.0.0.0/4 -j RETURN iptables -t nat -A REDSOCKS -d 240.0.0.0/4 -j RETURN iptables -t nat -A REDSOCKS -d 255.255.255.255 -j RETURN

global

[ "$global" = 1 ] && iptables -t nat -A REDSOCKS -p tcp -j REDIRECT --to $local_port

and redsocks not working, this erorr i got it

1554728604.008912 err redsocks.c:1390 redsocks_init_instance(...) bind: Address in use

my redsocks setting

base { log_debug = off; log_info = on; log = "file:/dev/null"; daemon = off; redirector = iptables; }

redsocks { local_ip = 0.0.0.0; local_port = 12345; ip = 127.0.0.1; port = 1080; type = socks5; }

dentuwu commented 6 months ago

нашел решение?