Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to connect to myip.ipip.net port 80:Connection refused #146

Open
zhangjuzuo opened this issue Sep 16, 2019 · 0 comments
Open

Failed to connect to myip.ipip.net port 80:Connection refused #146

zhangjuzuo opened this issue Sep 16, 2019 · 0 comments

Comments

@zhangjuzuo
Copy link

zhangjuzuo commented Sep 16, 2019

Hello! I have a problem without solutions. If you can see it, could you give me some advice?
I try to set my output tcp netflow to redsocks, the code is :
sudo iptables -t nat -A OUTPUT -p tcp -j REDSOCKS
then I try to use curl, but it becomes
xxx@xxx-VirtualBox:~$ curl myip.ipip.net --ipv4 curl: (7) Failed to connect to myip.ipip.net port 80: Connection denied
Before I typed, I have set these rules:
`xxx@xxx-VirtualBox:~$ sudo iptables -t nat -N REDSOCKS

xxx@xxx-VirtualBox:~$ sudo iptables -t nat -A REDSOCKS -d jp6mk2.jp.cloudnode.bid -j RETURN

xxx@xxx-VirtualBox:~$ sudo iptables -t nat -A REDSOCKS -d 0.0.0.0/8 -j RETURN

xxx@xxx-VirtualBox:~$ sudo iptables -t nat -A REDSOCKS -d 10.0.0.0/8 -j RETURN

xxx@xxx-VirtualBox:~$ sudo iptables -t nat -A REDSOCKS -d 127.0.0.0/8 -j RETURN

xxx@xxx-VirtualBox:~$ sudo iptables -t nat -A REDSOCKS -d 169.254.0.0/16 -j RETURN

xxx@xxx-VirtualBox:~$ sudo iptables -t nat -A REDSOCKS -d 172.16.0.0/12 -j RETURN

xxx@xxx-VirtualBox:~$ sudo iptables -t nat -A REDSOCKS -d 192.168.0.0/16 -j RETURN

xxx@xxx-VirtualBox:~$ sudo iptables -t nat -A REDSOCKS -d 224.0.0.0/4 -j RETURN

xxx@xxx-VirtualBox:~$ sudo iptables -t nat -A REDSOCKS -d 240.0.0.0/4 -j RETURN

xxx@xxx-VirtualBox:~$ sudo iptables -t nat -A REDSOCKS -p tcp -j REDIRECT --to-ports 12345`

and the curl is noral.
Now I dont know how to solve it, do you have any good advice?

andronoob pushed a commit to andronoob/redsocks that referenced this issue Apr 25, 2021
* fix Invalid bind address format bug on macos

* change version number

* add __APPLE__ macro when bind to be compatible with linux and openbsd sockets definition


This reverts commit 8ce821e.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant