DC++ FAQ » Configuration

ID #1012

How to setup active mode on FreeBSD (using ipfw/natd firewall)?

How to setup active mode on FreeBSD (using ipfw/natd firewall)

  1. Edit your ipfw rules list (usually something like /etc/rc.ipfw) . In there somewhere, you should have a rule that diverts all traffic to natd, which should look something like:
    ${fwcmd} add divert natd all from any to any via ${natd_interface}
  2. Below this, add as your next rule:
    # Direct Connect Active Mode Port Forwarding
    ${fwcmd} add pass all from any to any 1776 via ${oif}
    ${fwcmd} add pass all from any to any 1776 via ${iif}
  3. For "1776" replace any port (preferably something above 1000) that you would like as your forwarded port. Save and close /etc/rc.ipfw.
  4. Next open up your /etc/natd.conf file. Make sure the top line has your interface listed (replace "de0" with whatever your outside interface is):
    interface de0
  5. Then add at the end the following two lines:
    redirect_port tcp 192.168.70.2:1776 1776
    redirect_port udp 192.168.70.2:1776 1776
  6. For 192.168.70.2, substitute the internal IP of your machine running DC++. For "1776" substitute whichever port you used above in your /etc/rc.ipfw file.
  7. Finally, we need to reset ipfw and also natd.
    Type: ps aux | grep natd
  8. Find the process # for natd. Now we need to kill the process and restart it:
    Type: kill -9 <process #> && natd -f /etc/natd.conf
  9. Last step, time to reset ipfw to make sure our traffic gets through:
    /sbin/ipfw -f flush
    /bin/sh /etc/rc.ipfw

Submitted by SeeKay303

Last update: 2006-06-02 21:06
Author: BSOD2600
Revision: 1.0

Print this record Print this record
Send to a friend Send to a friend
Show this as PDF file Show this as PDF file
Export as XML-File Export as XML-File

Please rate this entry:

Average rating: 0 from 5 (0 Votes )

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry