LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How set the linux firewall to let eMule work (https://www.linuxquestions.org/questions/linux-networking-3/how-set-the-linux-firewall-to-let-emule-work-278865/)

mfeoli 01-17-2005 10:54 AM

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

mfeoli 01-18-2005 05:47 PM

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

dslboy 01-19-2005 05:24 AM

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...

TheIrish 01-19-2005 07:22 AM

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


mfeoli 01-19-2005 10:47 AM

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?


All times are GMT -5. The time now is 02:42 AM.