LinuxQuestions.org
Help answer threads with 0 replies.
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 10-06-2013, 03:44 PM   #1
n3k0
LQ Newbie
 
Registered: Oct 2013
Distribution: CentOS 6.4 x86_64
Posts: 4

Rep: Reputation: Disabled
Allowing ports IPtables


Hello members of LQ. I am a new member here and I need your help.

I have 1 dedicated server and OpenVZ virtualisation set up. On that server I have 4 OpenVZ virtualised servers (VPS) and I run rtorrents on them. When somebody adds a torrent to their rutorrent, it downloads automatically and seeds.

But the problem exists on website where you can't create a torrent without being connectable (means you have rutorrent port open) and that website checks that.

I would need to open ports for rtorrent, ingoing and outgoing so website can check if I am connectable or not through a port.

I have already tried allowing all traffic (maybe I have done it wrong) but it didn't help. I have also restarted iptables with "service iptables restart" but no luck.

OpenVZ VPS and my dedicated machine both run CentOS 6.4 x86_64.

Could anyone help me find where the problem is why doesn't it react to my commands and are they typed good.

Thank you,
n3k0
 
Old 10-06-2013, 04:00 PM   #2
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 349

Rep: Reputation: Disabled
what iptables commands did you run?
 
Old 10-06-2013, 04:04 PM   #3
n3k0
LQ Newbie
 
Registered: Oct 2013
Distribution: CentOS 6.4 x86_64
Posts: 4

Original Poster
Rep: Reputation: Disabled
I have tried runnning these 2 commands:
iptables -I INPUT -p tcp -m tcp --dport 23879:23886 -j ACCEPT
iptables -I OUTPUT -p tcp -m tcp --sport 23879:23886 -j ACCEPT

23879:23886 - this is the port range in .rtorrent.rc configuration file

And I have also tried this one which was suggested by my friend:
iptables -A INPUT -p tcp --dport 23879:23886 -j ACCEPT

Any help on fixing this would be appriciated.

I'm sorry my friend hasn't told me about this forum earlier because it's great as it has much information and really fast help.

Thanks
 
Old 10-06-2013, 04:10 PM   #4
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 349

Rep: Reputation: Disabled
did you ever try adding the ports to the FORWARD range?

Code:
iptables -I FORWARD -p tcp -m tcp --dport 23879:23886 -j ACCEPT
 
Old 10-06-2013, 04:23 PM   #5
n3k0
LQ Newbie
 
Registered: Oct 2013
Distribution: CentOS 6.4 x86_64
Posts: 4

Original Poster
Rep: Reputation: Disabled
No luck with that too... Everything worked well until 2 days ago when I had to reinstall all those VPS, and then these problems started. I have installed everything in the same way as before, and I didn't need to add iptables. I have no idea what could it be.

Here is my "netstat", maybe it helps:
http://pastebin.com/imMzPHxf

Thanks
 
Old 10-07-2013, 12:50 PM   #6
n3k0
LQ Newbie
 
Registered: Oct 2013
Distribution: CentOS 6.4 x86_64
Posts: 4

Original Poster
Rep: Reputation: Disabled
Nobody has an idea how this should be done, as the commands above don't work correctly...
Thanks
 
Old 10-07-2013, 10:23 PM   #7
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 349

Rep: Reputation: Disabled
maybe post your whole iptables.rules? censor addresses if you need. you could have a rule dropping the traffic somewhere before. also, are there any upstream firewalls that might need to be reconfigured, ever since you reinstalled the VPS setup?

also, i'm assuming that your torrent traffic is indeed TCP? and not UDP?

Last edited by psycroptic; 10-07-2013 at 10:26 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
allowing traffic in some ports igordonin Linux - Networking 10 12-11-2006 08:46 AM
iptables selectively allowing ports through mrsteveman1 Linux - Networking 1 06-21-2006 09:50 AM
blocking and allowing ports drumlix18 Linux - Networking 4 11-30-2004 06:36 PM
Allowing Data on Certain Ports bob4432 Linux - Networking 2 07-20-2004 01:30 PM
iptables -> Having a problem just allowing ports 25,110,22 ForumKid Linux - Security 6 01-03-2002 10:10 AM

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

All times are GMT -5. The time now is 06:11 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