evilsocket / xray

XRay is a tool for recon, mapping and OSINT gathering from public networks.
GNU General Public License v3.0
2.19k stars 297 forks source link

Can't bind to public IP #6

Closed ehsandeep closed 7 years ago

ehsandeep commented 7 years ago

All ports are open on the machine, but only localhost is working, when try to bind public ip using -address i see this, i tried to change ports as well, for all port get same error!

panic: listen tcp public_ip:8080: bind: cannot assign requested address

goroutine 18 [running]:
main.main.func2()
        /root/go/src/github.com/evilsocket/xray/cmd/xray/main.go:154 +0x23a
created by main.main
        /root/go/src/github.com/evilsocket/xray/cmd/xray/main.go:156 +0xc53
evilsocket commented 7 years ago

What do you mean with "public ip" ? Could you please share the command line arguments you are passing to xray?

ehsandeep commented 7 years ago

./xray -shodan-key my_key -domain trulia.com -address public ip

here public ip means public ip (external) of machine(vps) where am running xray.

evilsocket commented 7 years ago

It's not related to xray, it might be your system configuration requiring you to be root, or some limitation of your VPS provider ... if the ip is valid, and permissions are enough, it makes no difference to xray which address you're binding to.

ehsandeep commented 7 years ago

Okay

evilsocket commented 7 years ago

Yep I just tested on two of my dedicated servers and it worked without issues ...

evilsocket commented 7 years ago

(make sure you're using the correct ip from ifconfig ... also dmesg could help you spot the cause of the issue)

ehsandeep commented 7 years ago

Finally worked thanks for all the support :)

evilsocket commented 7 years ago

You're welcome ^_^

evilsocket commented 7 years ago

~ victory dance ~

┏(・o・)┛♪┗ (・o・) ┓