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

Listening only on IPV6 after building #27

Closed
Auroch opened this issue May 7, 2015 · 5 comments
Closed

Listening only on IPV6 after building #27

Auroch opened this issue May 7, 2015 · 5 comments

Comments

@Auroch
Copy link

Auroch commented May 7, 2015

After building on Debian Jessie, the transfersh-server only listen on ipv6 and on my OHV VPS, I can't disable IPV6.
Is there something I missed (some parameters on the command line) or do you think it's related to the #1 response from google at this other issue ?
https://code.google.com/p/go/issues/detail?id=5197

@nl5887
Copy link
Member

nl5887 commented May 7, 2015

What I'm reading at https://groups.google.com/forum/#!msg/golang-nuts/F5HE7Eqb6iM/q_um2VqT5vAJ is that the ipv4 packets are being received through the ipv6 address. Did you tested if it is able to receive data through the ipv4 address?

on linux, by default, net.ipv6.bindv6only is 0, so ipv4 packets could also be received from ipv6 sockets with ipv4-mapped ipv6 address. thus you only need to listen on tcp6 socket and we can support both ipv4 and ipv6.

@Auroch
Copy link
Author

Auroch commented May 8, 2015

Sorry, in fact, that work as you said but only if I test with local IP and not localhost ^^
This is OK

curl --upload-file ./test.txt http://127.0.0.1:8080/test.txt

This NOT ok

curl --upload-file ./test.txt http://localhost:8080/test.txt

Do you think it's normal the reply is in https ?

https://127.0.0.1/KIFsa/test.txt

@fredlubrano
Copy link

Hi,

I have the same problem "transfer server" listen on IPV6 only (Ubuntu 14.04).
The configuration of the IPv6 is disabled on the network interface
systcl.conf
net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1
net.ipv6.conf.lo.disable_ipv6=1

./transfersh-server -provider=local --port 8080 --temp=/tmp/ --basedir=/tmp/
2015/12/05 15:04:10 Transfer.sh server started. :
listening on port: 8080
using temp folder: /tmp/
using storage provider: local
2015/12/05 15:04:10 ---------------------------

ssldump -nni eth0 -Aed port 8080

New TCP connection #1: 88.XXX.XXX.XXX (49133) <-> 10.1.4.150(8080)

1449327978.9676 (0.0145) C>S

PUT /charles-proxy-3.11.3b4.dmg HTTP/1.1
Host: scal.xxxx.net:8080
User-Agent: curl/7.43.0
Accept: /
Content-Length: 57032570
Expect: 100-continue


1449327978.9680 (0.0003) S>C

HTTP/1.1 301 Moved Permanently
Location: https://transfer.sh/charles-proxy-3.11.3b4.dmg
Server: Transfer.sh HTTP Server 1.0
X-Made-With: <3 by DutchCoders
X-Served-By: Proudly served by DutchCoders
Date: Sat, 05 Dec 2015 15:06:18 GMT
Content-Length: 0
Content-Type: text/plain; charset=utf-8


1 1449327978.9818 (0.0137) C>S TCP FIN
1 1449327978.9819 (0.0001) S>C TCP FIN

lsof -ni

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
@xnbd-cli 863 root 3u IPv4 232 0t0 TCP 10.1.4.150:40418->10.1.4.155:4608 (ESTABLISHED)
dhclient 1794 root 6u IPv4 983 0t0 UDP *:bootpc
dhclient 1794 root 20u IPv4 7203 0t0 UDP *:59014
dhclient 1794 root 21u IPv6 7204 0t0 UDP *:60074
sshd 1900 root 3r IPv4 2818 0t0 TCP *:ssh (LISTEN)
sshd 1900 root 4u IPv6 2820 0t0 TCP *:ssh (LISTEN)
sshd 2003 root 3r IPv4 8207 0t0 TCP 10.1.4.150:ssh->88.XXX.XXX.XXX:59909 (ESTABLISHED)
ntpd 2263 ntp 16u IPv4 6882 0t0 UDP *:ntp
ntpd 2263 ntp 17u IPv6 6883 0t0 UDP *:ntp
ntpd 2263 ntp 18u IPv4 6889 0t0 UDP 127.0.0.1:ntp
ntpd 2263 ntp 19u IPv4 6890 0t0 UDP 10.1.4.150:ntp
sshd 12300 root 3r IPv4 17852 0t0 TCP 10.1.4.150:ssh->88.XXX.XXX.XXX:36092 (ESTABLISHED)
transfers 12661 root 3u IPv6 19949 0t0 TCP *:http-alt (LISTEN) <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

ifconfig
eth0 Link encap:Ethernet HWaddr 00:07:cb:03:30:9d
inet addr:10.1.4.150 Bcast:10.1.5.255 Mask:255.255.254.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:192153 errors:0 dropped:0 overruns:0 frame:0
TX packets:133889 errors:0 dropped:16 overruns:0 carrier:0
collisions:0 txqueuelen:532
RX bytes:171368714 (171.3 MB) TX bytes:944118436 (944.1 MB)
Interrupt:8

Thanks for the help

Best regards,

fred

@aksswami
Copy link

As @Auroch described, I am also facing same problem after building on OSX with docker. Not able to access it via localhost but working fine with 127.0.0.1. If I try from another machine on same network with network IP, then also it is not working.

@aspacca
Copy link
Collaborator

aspacca commented Jun 26, 2018

@aksswami , @fredlubrano , @Auroch , still relevant?

@aspacca aspacca closed this as completed Jul 2, 2018
This issue was closed.
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

5 participants