LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 01-17-2005, 10:54 AM   #1
mfeoli
Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 92

Rep: Reputation: 15
Question How set the linux firewall to let eMule work (need some ports to be viewable outside)


Hi,

I have my firewall without any rule (I still use ipchains)

Chain input (policy ACCEPT):
target prot opt source destination ports
- icmp ------ anywhere anywhere any -> any
- udp ------ anywhere anywhere any -> any
- tcp ------ anywhere anywhere any -> any
Chain forward (policy MASQ):
target prot opt source destination ports
- icmp ------ anywhere anywhere any -> any
- udp ------ anywhere anywhere any -> any
- tcp ------ anywhere anywhere any -> any
Chain output (policy ACCEPT):
target prot opt source destination ports
- icmp ------ anywhere anywhere any -> any
- udp ------ anywhere anywhere any -> any
- tcp ------ anywhere anywhere any -> any

and the "eMule" program needs to access the TCP port 4662 of my local computer to work properly,
aswell as the UDP 4672.

I don't know much about this but seems as the masquerading is not allowing anyone from outside to access a particular port,

how can I do this?

thanks for any tip

Last edited by mfeoli; 01-18-2005 at 06:23 PM.
 
Old 01-18-2005, 05:47 PM   #2
mfeoli
Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 92

Original Poster
Rep: Reputation: 15
I presume there must be a command that forwards the traffic for the two stated ports to the machine, making those ports accesible from the out world.

anyone knows how?

I appreciate any kind of input
 
Old 01-19-2005, 05:24 AM   #3
dslboy
Member
 
Registered: Aug 2003
Location: Norway
Distribution: Slackware -current
Posts: 157

Rep: Reputation: 30
What kind of connection do you have to the internet?
If you have a broadband router you need to open ports on that to.
With nat entries...
 
Old 01-19-2005, 07:22 AM   #4
TheIrish
Member
 
Registered: Oct 2003
Location: ITALY
Distribution: Debian, Ubuntu, Fedora
Posts: 137

Rep: Reputation: 15
It all depends if you're using a computer BEHIND a linux gateway.
In this case, the linux gateway must DNAT some ports.
Unluckly, I'm not very confident with ipchains, but in iptables, it works like this:
Code:
IPT=/sbin/iptables

EMULE_TCP=4662
EMULE_UDP=4672

TARGET_PC=192.168.0.2


## Creating eMule rules for (PREROUTING in nat)
$IPT -t nat -A PREROUTING -i eth1 -p udp -m udp --dport $EMULE_UDP -j DNAT --to-destination $TARGET_PC:$EMULE_UDP
$IPT -t nat -A PREROUTING -i eth1 -p tcp -m tcp --dport $EMULE_TCP -j DNAT --to-destination $TARGET_PC:$EMULE_TCP

Last edited by TheIrish; 01-19-2005 at 07:23 AM.
 
Old 01-19-2005, 10:47 AM   #5
mfeoli
Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 92

Original Poster
Rep: Reputation: 15
Thanks guys, I am actually working with a broadband connection, with a Cisco SOHO 77 router, but don't know how to open ports, I think they must be all open since everything works very good.

the solution for IPTables sounds like the one I'm looking for, just need to research how to do this on IPChains, anyone got a clue?
 
  


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
eMule For Linux? AFI_Flame Linux - Software 2 10-06-2004 01:33 AM
Linux firewall, cant get on my machine (stupid me) set reject to any TCP protocol AlexW Linux - Security 3 06-10-2004 04:07 PM
Trying to set linux box as router firewall that'll boot from floppy only dbiswaswb Linux - Newbie 7 05-09-2004 08:26 AM
emule for linux? scottie Linux - Software 5 11-14-2003 10:02 AM
emule don't work with iptables/nat coyote gomen Linux - Networking 1 08-16-2003 04:19 PM

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

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