LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 11-21-2001, 09:15 AM   #1
FredrikN
Member
 
Registered: Nov 2001
Location: Sweden
Distribution: GNU/Linux since -97
Posts: 149

Rep: Reputation: 15
Question Direct connect and Ipchains


Hi.
I have trouble with ipchains on my server.
I can use ftp, ssh and more on my client but i'cant use DC, very strange :-(

What could the correct chain look like to put DC on the internet ?

Thanks

//Fredrik
 
Old 11-21-2001, 11:24 PM   #2
xanthium
Member
 
Registered: Apr 2001
Location: Bombay ( INDIA )
Distribution: RedHat 7.x
Posts: 218

Rep: Reputation: 30
What is DC ?

Hi ,

It would help if you could specify what is DC ?

Regards ,
Xanthium .
 
Old 11-22-2001, 12:54 AM   #3
FredrikN
Member
 
Registered: Nov 2001
Location: Sweden
Distribution: GNU/Linux since -97
Posts: 149

Original Poster
Rep: Reputation: 15
DC = Direct Connect

Direct Connect
 
Old 11-23-2001, 06:22 AM   #4
raz
Member
 
Registered: Apr 2001
Location: London
Posts: 408

Rep: Reputation: 31
From FAQ of DC:
----------
By default, Direct Connect Uses port 412 for TCP and UDP data. This can be changed in the Direct Connect settings.
To make Direct Connect work properly with your NATing router, you must enter your routers WAN IP address in Direct Connects "Force Direct Connect to report this IP address" text box, and check associated check box.
-----------

So you'll need to add some rules to ipchains to allow port 412 to go out or inbound it doesn't say.

What you need to do is install DC and make sure nothing else is running, then fire it up and ask it to connect. 1 second after that, you type this on the Linux box.

ipchains -L -M -n

That will show you what connection it's requesting.
If unsure of what's happening post it here along with your other rules for ipchains and I'll show you the correct line to enable it.

/Raz
 
Old 11-23-2001, 06:42 AM   #5
FredrikN
Member
 
Registered: Nov 2001
Location: Sweden
Distribution: GNU/Linux since -97
Posts: 149

Original Poster
Rep: Reputation: 15
Thanks.
I typed ipchains -L -M -n and the output was this:

IP masquerading entries
prot expire source destination ports
UDP 02:07.32 192.168.0.2 212.181.52.2 1026 (61020) -> 53
UDP 02:07.32 192.168.0.2 212.181.52.2 1026 (61020) -> 53

212.181.52.2 is my gateway and 192.168.0.2 is my client with DC.
I tried several times to connect with DC but the output was the same all times.

Strange ?..........
 
Old 11-23-2001, 08:27 AM   #6
raz
Member
 
Registered: Apr 2001
Location: London
Posts: 408

Rep: Reputation: 31
ok that's showing you that your client has asked the DNS server to resolve a domain to an IP address.
Nothing to indicate that the DC software is getting out.

What are your rules for the firewall as it could deny the port even from your internal client.

type

ipchains -L -n

/Raz
 
Old 11-23-2001, 09:15 AM   #7
FredrikN
Member
 
Registered: Nov 2001
Location: Sweden
Distribution: GNU/Linux since -97
Posts: 149

Original Poster
Rep: Reputation: 15
Hi.

Check this file out, it is the one I'm using.



My firewall

Thanks again 4 your help

//FredrikN
 
Old 11-23-2001, 09:38 AM   #8
raz
Member
 
Registered: Apr 2001
Location: London
Posts: 408

Rep: Reputation: 31
ok I've got the file.
You can remove the link now.

I'll have a read and get back to you.

/Raz
 
Old 11-24-2001, 05:24 AM   #9
FredrikN
Member
 
Registered: Nov 2001
Location: Sweden
Distribution: GNU/Linux since -97
Posts: 149

Original Poster
Rep: Reputation: 15
Hi again , did you figure it out yet ?

Maybe it will be easier to just allow and accept everything while I'm using Direct connet.

Do you know how that chain will look like that accepts anything -> anywhere on my 192.168.0.1 -> 192.168.0.2 network ??

Thanks //FredrikN
 
Old 11-24-2001, 08:40 AM   #10
xanthium
Member
 
Registered: Apr 2001
Location: Bombay ( INDIA )
Distribution: RedHat 7.x
Posts: 218

Rep: Reputation: 30
DC ?

Hi Fred ,

Sorry for responding late .
UC iam not in US so dont know what DC is ? Some sort of ISP ?

Anyway it is not a good idea to let every thing IN into ur network .
What u can do is allow data related to specific services offeres by ur Linux machine.

What are the services offeres by ur linux box ? will tell u the chains that u need tp put for these specific services .

Please accpet my apologies for having kept u waiting .
Temporarily i dont have a Interne connection hence am irregular with checking my mails but will try best to respond as early as possible.

Regards.
 
Old 11-24-2001, 09:33 AM   #11
FredrikN
Member
 
Registered: Nov 2001
Location: Sweden
Distribution: GNU/Linux since -97
Posts: 149

Original Poster
Rep: Reputation: 15
Hi.
DC = Direct Connect and it's a filesharing program, peer 2 peer.

The problem is that I'm new to ipchains and I want to write some chains that allow DC out on the internet from my int network

//FredrikN
 
Old 11-27-2001, 04:05 AM   #12
raz
Member
 
Registered: Apr 2001
Location: London
Posts: 408

Rep: Reputation: 31
Right that's the most difficult to read rules file I've ever looked at.
It's got loads of "!" that put the rules in reverse. "very confusing when your trying to follow them"

Anyway there are a few incorrect ICMP rules that also need to be fixed.
Put this at the very end of the firewall script.

ipchains -A output -p icmp -s 0/0 -d 0/0 -j ACCEPT
ipchains -A input -p icmp -s 0/0 --icmp-type 0 -d 0/0 -j ACCEPT
ipchains -A input -p icmp -s 0/0 --icmp-type 3 -d 0/0 -j ACCEPT
ipchains -A input -p icmp -s 0/0 --icmp-type 4 -d 0/0 -j ACCEPT
ipchains -A input -p icmp -s 0/0 --icmp-type 9 -d 0/0 -j ACCEPT
ipchains -A input -p icmp -s 0/0 --icmp-type 12 -d 0/0 -j ACCEPT
ipchains -A input -p icmp -s 0/0 --icmp-type 14 -d 0/0 -j ACCEPT
ipchains -A input -p icmp -s 0/0 --icmp-type 18 -d 0/0 -j ACCEPT
ipchains -A input -p icmp -s 0/0 --icmp-type 8 -d 0/0 -j DENY -l
ipchains -A input -p icmp -s 0/0 --icmp-type 11 -d 0/0 -j DENY -l
ipchains -A input -p icmp -s 0/0 --icmp-type 10 -d 0/0 -j DENY -l

Ok to get DC to work try typing this as root or adding it to the firewall file.

ipchains -A input -p tcp ! -y -s 0/0 --sport 412 -d 194.236.131.110 1023:65535 -j ACCEPT
ipchains -A output -p tcp -s 0/0 1023:65535 --dport 412 -t 0x01 0x10 -j ACCEPT

I think 194.236.131.110 is your eth1 ip address if not replace it with the correct one.
I've also changed the TOS flag so the priority is higher for increased speed.

If this still doesn't wotk it might be that DC uses UDP, the FAQ doesn't say anything very helpful so we will just keep trying till it works.

/Raz
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 greenthing Linux - Software 1 03-07-2005 05:30 AM
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 QT DrOzz Linux - Software 6 09-27-2004 04:43 PM
Direct Connect mikedeatworld Linux - Software 0 06-08-2004 09:04 AM

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

All times are GMT -5. The time now is 01:04 AM.

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