TunSafe Forum

Welcome to the TunSafe Community Forum. This is open for discussions related to TunSafe and the WireGuard protocol.

You are not logged in.

#1 2019-03-29 16:01:47

gundan
Member
Registered: 2019-03-29
Posts: 1

Issues getting TCP service up

Hello,

I am just having a really puzzling problem.  I have compiled TunSafe and it works great when I listen and connect to a udp port, but when I try to listen to a tcp port, no luck.   I am unable to connect at all and further as there isn't much logging I am totally stumped. 

I am unable to get this to work in 3 discrete scenarios
1. VPS directly on the internet
2. A ubuntu 16 box inside my home
3. A fresh ubuntu 18 install inside my home.

When I am inside/outside my home or out and about in LTE I have no issues going udp, I just can't get tcp going.

Any advise is greatly appreciated.

root@storage3:/etc/wireguard# tunsafe start -d TunSafe.conf
Loading file: /etc/wireguard/TunSafe.conf
Started TCP listening socket on port 51820
Run: /sbin/ip address flush dev tun0 scope global
Run: /sbin/ip address add dev tun0 10.10.1.1/24
Run: /sbin/ip link set dev tun0 mtu 1420 up
Run: iptables -A FORWARD -i tun0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Switching to daemon mode...

My Server Config

[Interface]
Address = 10.10.1.1/24
PostUp = iptables -A FORWARD -i tun0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i tun0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
ListenPortTCP = 51820
ListenPort = 51820
PrivateKey = Gibberish

[Peer]
PublicKey = wESkIMfaeyB+eWVsRETpmyRyhNKVNHOU7VVOyfkvSDo=
AllowedIPs = 10.10.1.2/32

My Client Config
[Interface]
Address = 10.10.1.2/24
PrivateKey =Gibberish=
DNS = 1.1.1.1,8.8.8.8

[Peer]
PublicKey = EB57vmNXinOGylA3w8ZZCxg5OrjOxtjk3JWXnRUxBwo=
Endpoint = tcp://myhost.org:51820
AllowedIPs = 0.0.0.0/0
PersistentKeepalive = 21

Offline

#2 2019-04-04 06:27:56

hybtoy
Member
Registered: 2018-07-05
Posts: 24

Re: Issues getting TCP service up

remove

ListenPort = 51820

from your config, restart WG and try again.
1 config has to work only in 1 mode, tcp or udp

Offline

#3 2019-04-04 06:29:13

hybtoy
Member
Registered: 2018-07-05
Posts: 24

Re: Issues getting TCP service up

After that, run

netstat -tulpn

and paste output here.

Last edited by hybtoy (2019-04-04 09:18:38)

Offline

Board footer

Powered by FluxBB