airdcpp-web / airdcpp-webclient

Communal peer-to-peer file sharing application for file servers/NAS devices
https://airdcpp-web.github.io
171 stars 31 forks source link

Connectivity with Active Mode #397

Closed denppa closed 3 years ago

denppa commented 3 years ago

So if I am to use a wireguard connection for VPN when I connect to hubs, what is the optimal settings in both the wireguard config and within Airdc?

Should I pick a different bind address so the ports will appear as if it is running on the VPS which my local machine is connected to?

What is the optimal Active mode then?

It is more of how the iptables rules are messing me up. I don't know what is needed in order for me to forward ports to the VPN connection. Do you maybe have a sample?

EDIT: These are the iptable rules I added fo forward traffic from local to server and then also server to local to the wireguard conf:

Local:

PreUp = iptables -t nat -A PREROUTING -d ip.address -p tcp --dport 23288 -j DNAT --to-destination 10.66.66.1
PreUp = iptables -t nat -A PREROUTING -d ip.address -p udp --dport 21500 -j DNAT --to-destination 10.66.66.1
PreUp = iptables -t nat -A PREROUTING -d ip.address -p tcp --dport 13875 -j DNAT --to-destination 10.66.66.1

Server:

PreUp = iptables -t nat -A PREROUTING -d ip.address -p tcp --dport 23288 -j DNAT --to-destination 10.66.66.2
PreUp = iptables -t nat -A PREROUTING -d ip.address -p udp --dport 21500 -j DNAT --to-destination 10.66.66.2
PreUp = iptables -t nat -A PREROUTING -d ip.address -p tcp --dport 13875 -j DNAT --to-destination 10.66.66.2

Do you see anything I should change up to make it work better?