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

Issue With Public/Private IP. #18

Closed
Maikol665 opened this issue May 16, 2017 · 8 comments
Closed

Issue With Public/Private IP. #18

Maikol665 opened this issue May 16, 2017 · 8 comments

Comments

@Maikol665
Copy link

Hi, I have the following issue.
If I install this script directly with a VPS server that only has public IP works wonderfully, the password command does not work, but I am not interested.

My problem is in CenturyLink, which provide VPS servers with private IP addresses, and on the private network they assign the public IP.

Example:
Private: 10.100.10.xxx
Audience: 65.151.xxx.xxx

Try both ways and none works for me, is there any way to do this script using the network interface, "eth: 0; ens160"?

Or if there is any solution for me, please say.

@Lozy
Copy link
Owner

Lozy commented May 16, 2017

  1. First of all. After you install the Dante, ignore the screen errors. Just make sure installing the bin file in /etc/danted/sbin/sockd.

  2. Edit the config file

    vi /etc/danted/sockd.conf

    internal: ${ipaddr} port = ${port}
    external: ${ipaddr}

    replace the ${ipaddr}(In your point: 10.100.10.xxx) and ${port}

  3. boot the sockd.

    service sockd restart

It should be fine.

Edit: Of course, do not forget to build port mapping in CenturyLink's IP console.

@Maikol665
Copy link
Author

I have performed the steps, modify the file, place the internal and external ip, restart the service. But never want to start the Danted Server.

I always get the same error
Danted Server (Start Failed)

@Maikol665
Copy link
Author

If you can give me a contact from Skype, ICQ, or anywhere I would contact you and give you access to help me, I would be grateful.

@Lozy
Copy link
Owner

Lozy commented May 22, 2017

Don't worry. Please run these commands, and show me the results.

  1. check bin files /etc/danted/sbin/sockd -V
  2. remove pid file rm /var/run/sockd.pid
  3. open log tail -f /var/log/sockd.log
  4. start another ssh connection, run the server in console sockd -d 2
  5. check the tail -f /var/log/sockd.log to get error infomation.
  6. Remove pid file rm /var/run/sockd.pid again if everything seems good.
  7. service sockd restart
  8. service sockd status

@Maikol665
Copy link
Author

root@VA2ZVQHVPS203:~# tail -f /var/log/sockd.log
May 22 14:27:32 (1495463252.871903) sockd[24029]: warning: addrisbindable(): can't bind address: 65.151.188.142.0: Cannot assign requested address (errno = 99)
May 22 14:27:32 (1495463252.871971) sockd[24029]: error: checkconfig(): can not bind external address #0: IPv4 address 65.151.188.142/32, tcp: 0, udp: 0, op: none, end: 0
May 22 14:27:32 (1495463252.871988) sockd[24029]: alert: sockdexit(): terminating
May 22 14:27:32 (1495463252.872003) sockd[24029]: warning: sockdexit(): truncate(/var/run/sockd.pid): No such file or directory (errno = 2)
May 22 14:28:20 (1495463300.567514) sockd[24065]: warning: addrisbindable(): can't bind address: 65.151.188.142.0: Cannot assign requested address (errno = 99)
May 22 14:28:20 (1495463300.567650) sockd[24065]: error: checkconfig(): can not bind external address #0: IPv4 address 65.151.188.142/32, tcp: 0, udp: 0, op: none, end: 0
May 22 14:28:20 (1495463300.567693) sockd[24065]: alert: sockdexit(): terminating
May 22 14:29:06 (1495463346.637197) sockd[24081]: warning: addrisbindable(): can't bind address: 65.151.188.142.0: Cannot assign requested address (errno = 99)
May 22 14:29:06 (1495463346.637256) sockd[24081]: error: checkconfig(): can not bind external address #0: IPv4 address 65.151.188.142/32, tcp: 0, udp: 0, op: none, end: 0
May 22 14:29:06 (1495463346.637271) sockd[24081]: alert: sockdexit(): terminating

root@VA2ZVQHVPS203:~# sockd -d 2
May 22 14:29:57 (1495463397.740157) sockd[24115]: warning: parseconfig(): could not open /etc/sockd.conf: No such file or directory (errno = 2)
May 22 14:29:57 (1495463397.740375) sockd[24115]: warning: checkconfig(): no aut hentication methods enabled. This means all requests will be blocked after nego tiation. Perhaps this is not intended?
May 22 14:29:57 (1495463397.740489) sockd[24115]: warning: checkconfig(): settin g the unprivileged uid to 0 is not recommended for security reasons
May 22 14:29:57 (1495463397.740622) sockd[24115]: warning: checkconfig(): settin g the libwrap uid to 0 is not recommended for security reasons
May 22 14:29:57 (1495463397.740745) sockd[24115]: error: checkconfig(): no inter nal address given for server to listen for clients on
May 22 14:29:57 (1495463397.740851) sockd[24115]: alert: sockdexit(): terminatin g
May 22 14:29:57 (1495463397.740915) sockd[24115]: warning: sockdexit(): truncate (/var/run/sockd.pid): No such file or directory (errno = 2)

root@VA2ZVQHVPS203:~# tail -f /var/log/sockd.log
May 22 14:27:32 (1495463252.871903) sockd[24029]: warning: addrisbindable(): can't bind address: 65.151.188.142.0: Cannot assign requested address (errno = 99)
May 22 14:27:32 (1495463252.871971) sockd[24029]: error: checkconfig(): can not bind external address #0: IPv4 address 65.151.188.142/32, tcp: 0, udp: 0, op: none, end: 0
May 22 14:27:32 (1495463252.871988) sockd[24029]: alert: sockdexit(): terminating
May 22 14:27:32 (1495463252.872003) sockd[24029]: warning: sockdexit(): truncate(/var/run/sockd.pid): No such file or directory (errno = 2)
May 22 14:28:20 (1495463300.567514) sockd[24065]: warning: addrisbindable(): can't bind address: 65.151.188.142.0: Cannot assign requested address (errno = 99)
May 22 14:28:20 (1495463300.567650) sockd[24065]: error: checkconfig(): can not bind external address #0: IPv4 address 65.151.188.142/32, tcp: 0, udp: 0, op: none, end: 0
May 22 14:28:20 (1495463300.567693) sockd[24065]: alert: sockdexit(): terminating
May 22 14:29:06 (1495463346.637197) sockd[24081]: warning: addrisbindable(): can't bind address: 65.151.188.142.0: Cannot assign requested address (errno = 99)
May 22 14:29:06 (1495463346.637256) sockd[24081]: error: checkconfig(): can not bind external address #0: IPv4 address 65.151.188.142/32, tcp: 0, udp: 0, op: none, end: 0
May 22 14:29:06 (1495463346.637271) sockd[24081]: alert: sockdexit(): terminating

root@VA2ZVQHVPS203:~# rm /var/run/sockd.pid
rm: cannot remove '/var/run/sockd.pid': No such file or directory

root@VA2ZVQHVPS203:~# service sockd status

  • sockd.service - Dante Socks5 Daemon, Provider by sockd.info
    Loaded: loaded (/lib/systemd/system/sockd.service; enabled; vendor preset: enabled)
    Active: inactive (dead) (Result: exit-code) since Mon 2017-05-22 14:27:33 UTC; 4min 1s ago
    Condition: start condition failed at Mon 2017-05-22 14:28:33 UTC; 3min 1s ago
    ConditionPathExists=!/var/run/sockd.pid was not met
    Docs: https://github.com/lozy/danted
    Process: 24029 ExecStart=/etc/danted/sbin/sockd -f /etc/danted/sockd.conf -N ${Start_Process} ${Sockd_Opts} (code=exited, status=1/FAILURE)
    Main PID: 24029 (code=exited, status=1/FAILURE)

May 22 14:27:32 VA2ZVQHVPS203 systemd[1]: sockd.service: Main process exited, code=exited, status=1/FAILURE
May 22 14:27:32 VA2ZVQHVPS203 systemd[1]: sockd.service: Unit entered failed state.
May 22 14:27:32 VA2ZVQHVPS203 systemd[1]: sockd.service: Failed with result 'exit-code'.
May 22 14:27:33 VA2ZVQHVPS203 systemd[1]: sockd.service: Service hold-off time over, scheduling restart.
May 22 14:27:33 VA2ZVQHVPS203 systemd[1]: Stopped Dante Socks5 Daemon, Provider by sockd.info.
May 22 14:27:33 VA2ZVQHVPS203 systemd[1]: sockd.service: Start request repeated too quickly.
May 22 14:27:33 VA2ZVQHVPS203 systemd[1]: Failed to start Dante Socks5 Daemon, Provider by sockd.info.
May 22 14:28:33 VA2ZVQHVPS203 systemd[1]: Stopped Dante Socks5 Daemon, Provider by sockd.info.

@Lozy
Copy link
Owner

Lozy commented May 22, 2017

something wrong with your config file.

vi /etc/danted/sockd.conf

internal: YOUR-PRIVATE-IP-ADDR port = PORT
external: YOUR-PRIVATE-IP-ADDR

@Maikol665
Copy link
Author

Generate by sockd.info

Generate interface 10.167.59.12

internal: 10.167.59.12 port = 9998
external: 10.167.59.12

Generate interface 10.167.59.13

internal: 10.167.59.13 port = 9998
external: 10.167.59.13

Generate interface 10.167.59.14

internal: 10.167.59.14 port = 9998
external: 10.167.59.14

external.rotation: same-same
method: pam none
clientmethod: none
user.privileged: root
user.notprivileged: sockd
logoutput: /var/log/sockd.log

client pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
}
client block {
from: 0.0.0.0/0 to: 0.0.0.0/0
}
pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
protocol: tcp udp
method: pam
log: connect disconnect
}
block {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: connect error
}

root@VA2ZVQHVPS203:~# /etc/init.d/sockd start
Starting Dante SOCKS 5 daemon:
Danted Server [ Running;Failed ]

You Have Skype?, Add Me Maikol665

@Lozy
Copy link
Owner

Lozy commented May 22, 2017

Add you.

~# sockd -h
dante v1.3.2.  Copyright (c) 1997 - 2010, Inferno Nettverk A/S, Norway.
usage: sockd [-DLNVdfhnv]
   -D             : run in daemon mode
   -L             : shows the license for this program
   -N <number>    : fork of <number> servers [1]
   -V             : verify configuration and exit
   -d <number>    : set degree of debugging
   -f <filename>  : use <filename> as configuration file [/etc/danted/sockd.conf]
   -h             : print this information
   -n             : disable TCP keep-alive
   -p <filename>  : write pid to <filename> [/var/run/sockd.pid]
   -v             : print version info

could you run this, same output?
I am not sure about your configuration file path [/etc/danted/sockd.conf]~

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

2 participants