Passive Mode

Archived discussion about features (predating the use of Bugzilla as a bug and feature tracker)

Moderator: Moderators

Locked
Becky636
Posts: 7
Joined: 2003-01-05 17:12

Passive Mode

Post by Becky636 » 2003-01-05 17:15

I would love to be able to ccect to a passive mode user while I am using passive mode...


Is this a Possiblity??

:D
Becky636 makeitso.dyndns.tv or enterprisenx01.dyndns.tv

ivulfusbar
Posts: 506
Joined: 2003-01-03 07:33

Post by ivulfusbar » 2003-01-05 17:30

this is _impossible_ and can never be fixed.
Everyone is supposed to download from the hubs, - I don´t know why, but I never do anymore.

Becky636
Posts: 7
Joined: 2003-01-05 17:12

Post by Becky636 » 2003-01-05 17:43

What actually causes it to be impossible?
:?:
Becky636 makeitso.dyndns.tv or enterprisenx01.dyndns.tv

Sedulus
Forum Moderator
Posts: 687
Joined: 2003-01-04 09:32
Contact:

Post by Sedulus » 2003-01-05 18:00

in active mode, you send a
$ConnectToMe <OtherNick> <MyIP>:<MyPort>
and the user with <OtherNick> recieves this, and connects to <YourIP> on <YourPort>.

in passive mode, you send a
$RevConnectToMe <MyNick> <OtherNick>
and the other user should reply with a
$ConnectToMe <MyNick> <OtherIP>:<OtherPort>
and your client connects to <OtherIP> on <OtherPort>

if you are both passive, it means that you both can only initiate outbound connections (compare with connecting _to_ a website, instead of _running_ one on your local machine to which others can connect).

and the way networking works, one of you will have to Listen while the other one Connects, so you will always need one active user.


try to focus on creating active mode for yourself.
- if you have an IP address that is not local (i.e. 10.x.x.x or 192.168.x.x) it might be possible to just turn your firewall off.
- if you have a local IP address, you should see if you can modify the router that provides your internet access, and use `port forwarding' to forward ports from the external IP to your local IP. you'll need to consult the manual for your router for that.


hope this helps some
/sed
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)

ivulfusbar
Posts: 506
Joined: 2003-01-03 07:33

Post by ivulfusbar » 2003-01-05 18:04

No one opens a port that the other user can connect to. So no transfers can begin.

It works like this: (almost, i leave out certain details to keep it short)

A1 = Active client 1
A2 = Active client 2
P1 = Passive client 1
P2 = Passive client 2

We have 2*2 possible combinations:
1) A1 wants to download from A2,
A1 sends his ip:port through hub that transfer it to A2 that connects to A1 and handshake/transfers begin.

2) A1 wants to download from P2,
Exactly as above (exchange A2 with P2)

3) P1 wants to download from A2,
P1 tells A2 to connect to P1 with RevConnectToMe (through the hub)
A2 then begin as in 1) sends ip, port, p1 connects etc....

4) P1 wants to download from P2,
ooooops no one wants to open a port where traffic will run.. oops... communication impossible.
Everyone is supposed to download from the hubs, - I don´t know why, but I never do anymore.

Becky636
Posts: 7
Joined: 2003-01-05 17:12

Post by Becky636 » 2003-01-05 19:40

OK if that is not possible how can I get my Router to work with DC ++
It is Netgear RP114 firewall router..

I set the port forwarding to different #'s ex 6257 , 16257, 1412, 80.

None seem to work I have Cable modem connection w/ Charter Communications.. and Win XP..

This is driving me nuts..


Thank you
Becky636 makeitso.dyndns.tv or enterprisenx01.dyndns.tv

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Port Forwarding DC++

Post by GargoyleMT » 2003-01-08 12:02

Becky636 wrote:OK if that is not possible how can I get my Router to work with DC ++
It is Netgear RP114 firewall router..


First, configure your client with a specific port - 1412 used to be the default, but if the port box is blank, it will pick a random one. Next, you must force (ok... last time I checked at least) the IP to be the exteral IP of your router. Next, configure your router to port forward both TCP and UDP connections on the port you picked to your personal machine. Your client is now ready for operating in active mode.

zyone
Posts: 2
Joined: 2003-01-11 09:00
Location: Stockholm, Sweden
Contact:

Passive mode

Post by zyone » 2003-01-11 09:02

Thanks! Worked great for me.

joazito
Posts: 17
Joined: 2003-01-06 04:57
Location: Portugal

Re: Port Forwarding DC++

Post by joazito » 2003-01-11 11:17

GargoyleMT wrote:
Becky636 wrote:OK if that is not possible how can I get my Router to work with DC ++
It is Netgear RP114 firewall router..


First, configure your client with a specific port - 1412 used to be the default, but if the port box is blank, it will pick a random one. Next, you must force (ok... last time I checked at least) the IP to be the exteral IP of your router. Next, configure your router to port forward both TCP and UDP connections on the port you picked to your personal machine. Your client is now ready for operating in active mode.


This seems like a pretty usefull post. Maybe it should be added to a DC++ faq or something.

zyone
Posts: 2
Joined: 2003-01-11 09:00
Location: Stockholm, Sweden
Contact:

Passive mode

Post by zyone » 2003-01-13 08:30

A hint for you users working on getting an active connection, having a ***router and a dynamic internet IP address:

I use (myhostname).mine.nu as a static hostname for my dynamic IP address. In DC++ 0.22, I typed my static hostname instead of my dynamic IP. Seems to work just fine. Now I can connect with passive users without having to worry about my internet IP changing from time to time.

This all of course after having configured port forwarding in my router and having set a static port in DC++.

Cheers!

acc
Posts: 5
Joined: 2003-01-14 18:46

Post by acc » 2003-01-14 18:54

Can someone tell me how to port forward TCP and UDP connections with IPCHAINS, so that active mode will work?

sandos
Posts: 186
Joined: 2003-01-05 10:16
Contact:

Post by sandos » 2003-01-14 22:47

ivulfusbar wrote:this is _impossible_ and can never be fixed.


Not quite, if youve got a SOCKS server able to accept incoming connections. The problem here is knowing other passive users´ ip-addresses, which is not possible with a vanilla dc-hub, but it might be sometime if one extension allowing this is made.

Sedulus
Forum Moderator
Posts: 687
Joined: 2003-01-04 09:32
Contact:

Post by Sedulus » 2003-01-14 23:04

acc wrote:Can someone tell me how to port forward TCP and UDP connections with IPCHAINS, so that active mode will work?

ipchains is somewhat obsolete, consider using iptables in the future

here are the iptables rules:
iptables -t nat -A PREROUTING -s ! 192.168.0.0/16 -d <external_ip> -p tcp --dport 1412 -j DNAT --to <internal_ip>
iptables -t nat -A PREROUTING -s ! 192.168.0.0/16 -d <external_ip> -p udp --dport 1412 -j DNAT --to <internal_ip>

(note that the lan used here is 192.168.*.* (netmask 255.255.0.0), and the port is 1412)
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)

Sedulus
Forum Moderator
Posts: 687
Joined: 2003-01-04 09:32
Contact:

Post by Sedulus » 2003-01-14 23:12

http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)

Sedulus
Forum Moderator
Posts: 687
Joined: 2003-01-04 09:32
Contact:

Post by Sedulus » 2003-01-14 23:18

and then again... shutting down my pc wouldn't be nice to all you leechers.. but then you'd have to watch me post msgs when not sober.. sorry about that post.. the ipchains rules are not specified.. it's iptables again

:P

(maybe an edit-post-feature would be nice in phpBB)

/sed
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)

acc
Posts: 5
Joined: 2003-01-14 18:46

Post by acc » 2003-01-15 08:46

Yes i guess i really should update finally, have been running 2.2X kernel for so long, cant wait to get active mode on :)

acc
Posts: 5
Joined: 2003-01-14 18:46

Post by acc » 2003-01-15 10:36

I just tried something with ipmasqadm.
Like this:
ipmasqadm portfw -a -P tcp -L externalip 1412 -R 192.168.0.2 1412
ipmasqadm portfw -a -P udp -L externalip 1412 -R 192.168.0.2 1412

And i put the port and externalip to the client. Search seems to work well
but from active users i get timeouts, from passive users i can download just fine. Do you think this should work or should i just update to iptables? :)

ender
Posts: 224
Joined: 2003-01-03 17:47

Post by ender » 2003-01-15 15:04

here's a script I used to use (somebody on the old lichlord forums posted it):

Code: Select all

#! /bin/sh
EXT_IF="<external interface (eth0, ppp0...)>"
EXT_IP="<your external IP here>"
INT_IP="<the IP you're forwarding to>"
PORT="<port you wish to use>"

# Allow DC++ connections to firewall

ipchains -A input -j ACCEPT -s 0/0 -d $EXT_IP $PORT -p tcp -i $EXT_IF
ipchains -A input -j ACCEPT -s 0/0 -d $EXT_IP $PORT -p udp -i $EXT_IF

# Forward DC++ connections

ipmasqadm portfw -a -P tcp -L $EXT_IP $PORT -R $INT_IP $PORT
ipmasqadm portfw -a -P udp -L $EXT_IP $PORT -R $INT_IP $PORT

acc
Posts: 5
Joined: 2003-01-14 18:46

Post by acc » 2003-01-19 10:31

I am still using ipchains and ipmasqadm, everything seems to work
in active mode, but i get disconnected from every hub quite often,
like every 10-20minutes. Also theres alot of "Connection Timout"
in the download queue. I wonder whats causing this?

Cooler
Posts: 1
Joined: 2003-01-31 01:47

Re: Passive Mode

Post by Cooler » 2003-01-31 02:04

Becky636 wrote:I would love to be able to ccect to a passive mode user while I am using passive mode...


Is this a Possiblity??

:D
This must be possible in some way, some how... maybe we need a server to help the transfers to go in the right place. Now the connections go directly from User1-to-User2. Any company that want's to stop the pirates to spread could easily sue the owner of the server that delivers the data from user to user... so... :( not good idea in this way..

NAT (native address translation... many users behind the same IP address) = passive

NAT to NAT impossible??? No, it's possible. :D
There is programs that send a big files with fast speed from passive to passive.

- :) Eyeball chat works with all connections and you can send files from user behind NAT fo user behind NAT. And the Video-chat and sound is working on a real time. http://www.eyeball.com

- :) TeraPod (external plug-in for MSN Messenger). It adds a possibility to send files to friend if both persons are behind NAT (passive connection). http://www.terapod.com

Now I have to say that many programs don't have that possibility, like: ICQ, MSN Messenger, etc. :(

..and sorry my bad english
..how should I know anything.. I'm just an amateur...

Gadget
Posts: 62
Joined: 2003-01-11 06:24
Location: Finland
Contact:

Re: Passive Mode

Post by Gadget » 2003-01-31 23:12

NAT (native address translation... many users behind the same IP address) = passive
Actually NAT=Network Address Translation (sometimes PAT, Port Address Translation)
NAT to NAT impossible??? No, it's possible. :D
This depends of type of NATting, see How NAT works.
TeraPod (external plug-in for MSN Messenger). It adds a possibility to send files to friend if both persons are behind NAT (passive connection). http://www.terapod.com
That also depends of type of NATting. This is not possible if the router uses a random port each time. Proxies can also halt the connection.

h0mersimps0n84
Posts: 2
Joined: 2003-02-07 00:19
Location: Miami
Contact:

Post by h0mersimps0n84 » 2003-02-07 00:38

wouldnt it be possible to do a kind of fxp transfer where the two passive users establish a connection to the server, and then the server kind of fxps the stuff to be transferred between the two users...........as i was thinking of this, on the one hand it hit me that it might take up too much of the server's bandwidth if all the passive users were doing this.......but on the other hand........if it was a truly a fxp and not the server downloading and then reuploading then not so much bandwidth would be used........just a thought.........

i do realize that for this to work the servers would all need to be upgraded to support this..........but w/e theoretically speaking couldnt it be done like that? :D

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2003-02-12 20:45

h0mersimps0n84 wrote:wouldnt it be possible to do a kind of fxp transfer where the two passive users establish a connection to the server, and then the server kind of fxps the stuff to be transferred between the two users
A nice idea, but you can't use FXP between two FTP servers that only accept PASV connections, either.

Gizzard
Posts: 1
Joined: 2003-02-19 15:45

Little iptable script for forwarding ports

Post by Gizzard » 2003-02-19 15:51

Just change ppp0 to whatever you are using to connect to the net ethX pppx etc...

Code: Select all

#!/bin/sh
iptables -t nat -A PREROUTING -i ppp0 -p tcp --destination-port xxxx  -j DNAT --to xxx.xxx.xxx.xxx
iptables -t nat -A PREROUTING -i ppp0 -p UDP --destination-port xxxx  -j DNAT --to xxx.xxx.xxx.xxx

drwho
Posts: 3
Joined: 2003-02-27 20:08
Location: Boston, MA, USA

p2p nat article

Post by drwho » 2003-02-27 20:12

it may be possible to do P2P / DC from behind a nat just ok.

http://www.alumni.caltech.edu/~dank/peer-nat.html

Please let's figure this out. Too many people are behind NAT for DC to work well. When I switched from Passive to Active it was amazing how much more active my connection became.

Locked