LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-19-2005, 03:59 PM   #1
pircio
LQ Newbie
 
Registered: Apr 2004
Distribution: Debian
Posts: 15

Rep: Reputation: 0
Issues with port forwarding


I have FINALLY got webmin up and running and my linux box running as a router, it took awhile but its good.

However i'm having a problem with azareus telling me that my TCP/UDP port 6881 is being blocked, which it probably is. I don't have a lot of iptables know how but I'd like to get this working.

How do I just upon the port on my router to allow this connection?
 
Old 12-19-2005, 04:54 PM   #2
WindowBreaker
Member
 
Registered: Oct 2005
Distribution: Slackware
Posts: 228

Rep: Reputation: 40
There are two ways to do this, depending on your router setup.
You either have one of the two scenarios:
1. You're using Azareus on the router itself.
2. You're using Azareus on a machine behind the router on your lan.

Option 1:
If you're using Azareus on the router box, then you'll want to use the INPUT chain, which will work on packets destined for the linux router itself, and not for a machine behind the router.

You could do:
iptables -A INPUT -p tcp --dport 6881 -j ACCEPT
iptables -A INPUT -p udp --dport 6881 -j ACCEPT

This will work if no previous rule would block it out, such as a catch-all rule that drops everything.

If there is a catch-all rule, and you append (-A) this rule to it, it will still fail. In that case, you can do:

iptables -I INPUT -p tcp --dport 6881 -j ACCEPT
iptables -I INPUT -p udp --dport 6881 -j ACCEPT

Option 2:
If you have a machine behind the router, and not the router itself, and would like to forward all incoming connections on that port to that machine, then do the following.
Let's say the private ip address of the machine behind the router (the one you're running Azareus on) is 192.168.0.101:
Then you would do:
iptables -t nat -A PREROUTING -p tcp --dport 6881 -j DNAT --to-destination 192.168.0.101
iptables -t nat -A PREROUTING -p udp --dport 6881 -j DNAT --to-destination 192.168.0.101

Hope that helps.

Pablo
 
Old 12-19-2005, 05:00 PM   #3
pircio
LQ Newbie
 
Registered: Apr 2004
Distribution: Debian
Posts: 15

Original Poster
Rep: Reputation: 0
well it does help in the sense that it tells me how to do port forwarding to a specific port

i have method 2 :P -- 2 computers behind the router, each have azareus, do i have to set them up on different ports? or can i simply just open the udp/idp ports so they're available to each computer
 
  


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
IPCHAINS port forwarding and IPTABLES port forwarding ediestajr Linux - Networking 26 01-14-2007 07:35 PM
Simple Port Forwarding Firewall - not forwarding MadTurki Linux - Security 14 04-09-2006 12:08 PM
Port 80 forwarding to port 22 with iptables zahoo Linux - Networking 3 02-22-2005 07:22 AM
port forwarding and packet forwarding syrtsardo Linux - Newbie 2 07-03-2003 10:37 AM
port forwarding jakublgz Linux - Networking 5 02-04-2003 08:22 PM

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

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