LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-12-2003, 05:35 PM   #16
__modal__
LQ Newbie
 
Registered: Feb 2002
Location: Vancouver, BC, Canada
Distribution: FC6
Posts: 7

Rep: Reputation: 0

Its been awhile here and just noticed that no-one had posted a definitive answer, so here goes:
1. Switch to a 2.4 + kernel with NAT/iptables (I never got it working with ipchains)

iptables -A PREROUTING -d xxx.xxx.xxx.xxx -i eth0 -p tcp -m tcp --dport 412 -j DNAT --to-destination 192.168.0.1:412
iptables -A POSTROUTING -s 192.168.0.0/255.255.0.0 -o eth0 -j MASQUERADE

xxx.xxx.xxx.xxx = your external IP

Or make your life easier and grab gShield from;
http://muse.linuxmafia.org/gshield.html

which was a big help to me for learning about NAT/iptables
 
Old 08-05-2004, 12:14 PM   #17
posto
LQ Newbie
 
Registered: Jul 2004
Location: RO, Bucharest
Distribution: Ubuntu
Posts: 12

Rep: Reputation: 0
another way of doing this (previous post didnt seem to solve my problem) is:

Things marked with bold should be changed to fit your set up:

eth0 - replace that with your external interface
xxx.xxx.xxx.xxx - replace that with your external ip (get your external IP from here )
yyy.yyy.yyy.yyy - replace that with the IP of the computer running dc++
zzzz - in DC++, File->Settings->Connection Settings, choose Active, in the IP box enter your external IP, in the port box enter any number (recommended to be higher than 1024). Modify the script below with the port you chose in dc++ settings. EX: 6666, 8888, 1400, etc.

Below are the 4 commands you need to run to make dc++ run in active mode while behind NAT:
Code:
/sbin/iptables -t nat -A PREROUTING -p tcp -i eth0 -d xxx.xxx.xxx.xxx --dport zzzz -j DNAT --to yyy.yyy.yyy.yyy:zzzz

/sbin/iptables -t nat -A PREROUTING -p udp -i eth0 -d xxx.xxx.xxx.xxx --dport zzzz -j DNAT --to yyy.yyy.yyy.yyy:zzzz

/sbin/iptables -A FORWARD -p tcp -i eth0 -d xxx.xxx.xxx.xxx --dport zzzz -j ACCEPT

/sbin/iptables -A FORWARD -p udp -i eth0 -d xxx.xxx.xxx.xxx --dport zzzz -j ACCEPT

Last edited by posto; 08-05-2004 at 12:15 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
direct connect monohouse Linux - Software 3 07-11-2005 08:10 AM
iptables and vsftpd on firewall box - can't connect radiowhiz Linux - Networking 6 03-30-2005 12:03 PM
Direct Connect (DC) ShadowMetis Linux - Software 1 02-17-2005 10:22 PM
direct connect maseby General 1 10-24-2004 10:53 AM
direct connect mkacz9 Linux - Software 2 10-07-2003 07:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration