User User name Password  
   
Wednesday 27.11.2024 / 22:34
Search AfterDawn Forums:        In English   Suomeksi   På svenska
afterdawn.com > forums > software, operating systems and more > linux - general discussion > how do i port forward when using linux ???
Show topics
 
Forums
Forums
HOw do I Port Forward when using Linux ???
  Jump to:
 
Posted Message
Patmann66
Newbie
_
31. January 2006 @ 08:30 _ Link to this message    Send private message to this user   
I was just wondering how to port forward using Linux as a router.. I'm trying to use Azureus and I keep on getting a NAT Error .. so if anyone can help me with this it would be greatly appreciated.

PATMANNNNNNNNNNN666\M/
Advertisement
_
__
ddp
Moderator
_
31. January 2006 @ 11:33 _ Link to this message    Send private message to this user   
read the forum rules above about posting. 1 thread per subject. other thread closed. http://forums.afterdawn.com/thread_jump.cfm/297102/1702182
Daniel_G
Suspended permanently
_
31. January 2006 @ 12:48 _ Link to this message    Send private message to this user   
Some more info would be handy...
What Linux distribution are you using?
What application are you using to do manage your connection?
How experienced are you in using linux?

ad_buddies java irc applet : http://adbuddies.ccsau.com/
Spiney4
Newbie
_
31. January 2006 @ 16:48 _ Link to this message    Send private message to this user   
I have a Linux machine acting as a router for me, using iptables. Coincidentally, I started using Azureus last week. To pass the Azureus required port 6881 from my Linux router to my Linux desktop (192.168.0.2) I used the following bash script:

#!/bin/sh

export ETH=`ifconfig eth0 | awk '{print $2}' | grep addr | cut -b 6-`
export PORT="6881"

for j in ${PORT}
do
iptables -t nat -I POSTROUTING -s 192.168.0.2 -p udp \
--dport $j -j SNAT --to-source ${ETH}:$j
iptables -t nat -I POSTROUTING -s 192.168.0.2 -p udp \
--sport $j -j SNAT --to-source ${ETH}:$j

iptables -t nat -I PREROUTING -p udp -d ${ETH} --dport $j \
-j DNAT --to-destination 192.168.0.2

iptables -t nat -I POSTROUTING -s 192.168.0.2 -p tcp \
--dport $j -j SNAT --to-source ${ETH}:$j
iptables -t nat -I POSTROUTING -s 192.168.0.2 -p tcp \
--sport $j -j SNAT --to-source ${ETH}:$j

iptables -t nat -I PREROUTING -p tcp -d ${ETH} --dport $j \
-j DNAT --to-destination 192.168.0.2
done

To tell the truth, I'm not 100% the UDP port needs to be passed, but I thought I read that when Azureus first reported NAT problems.

I hope that helps.
Advertisement
_
__
 
_
Patmann66
Newbie
_
3. February 2006 @ 07:51 _ Link to this message    Send private message to this user   
ya thnx man It helped a lot I tried It and It worked.. Thnx man :PP:P

PATMANNNNNNNNNNN666\M/
afterdawn.com > forums > software, operating systems and more > linux - general discussion > how do i port forward when using linux ???
 

Digital video: AfterDawn.com | AfterDawn Forums
Music: MP3Lizard.com
Gaming: Blasteroids.com | Blasteroids Forums | Compare game prices
Software: Software downloads
Blogs: User profile pages
RSS feeds: AfterDawn.com News | Software updates | AfterDawn Forums
International: AfterDawn in Finnish | AfterDawn in Swedish | AfterDawn in Norwegian | download.fi
Navigate: Search | Site map
About us: About AfterDawn Ltd | Advertise on our sites | Rules, Restrictions, Legal disclaimer & Privacy policy
Contact us: Send feedback | Contact our media sales team
 
  © 1999-2024 by AfterDawn Ltd.

  IDG TechNetwork