aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: [howto] LowID: open/forward port on your SuSE router/client  (Read 3170 times)

tuxlover

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 5

SuSE on router/firewall:

If you use SuSE Linux on your router/firewall to connect to the internet you can do the following to forward the ports used by e/amule to your client: You need to set your firewall to forward all connections coming to it on ports 4662 and 4672 in tcp and udp to your internal client machine.

Open /etc/sysconfig/SuSEfirewall2, and locate FW_FORWARD_MASQ (it's in 14.). Now, assuming your client's ip is 192.168.0.3, set this to this value:

FW_FORWARD_MASQ="0/0,192.168.0.3,tcp,4662  0/0,192.168.0.3,udp,4662  0/0,192.168.0.3,tcp,4672 0/0,192.168.0.3,udp,4672"

(Note that a rule like "0/0,192.168.0.3,tcp,4662" simply means that incoming tcp connections over port 4662 from any address (0/0) will be forwarded to your the machine 192.168.0.3, on the same port.)

For this to work, you have to have FW_ROUTE (5.) set to "yes" in the same file.

After making these changes, save the file (;)) and then start yast. Go to "Security and users" (or similar), and there choose "Firewall". Now simply go through all dialogs and finish them; at the end it will restart your firewall with these new rules.
Watch out; depending on your config you can lock yourself out of your (remote) machine!
To restart the firewall you can *probably* also do
# /sbin/SuSEfirewall2 stop; /sbin/SuSEfirewall2 start


SuSE on client machine:

If you run SuSE on your client machine which runs a firewall itself, you need to do the following to allow the correct ports to come through: You basically need to allow tcp and udp ports 4662 and 4672 to be open.

Open /etc/sysconfig/SuSEfirewall2, and locate FW_SERVICES_EXT_TCP and FW_SERVICES_EXT_UDP. Now add to both of these the above ports:
FW_SERVICES_EXT_TCP="4662 4672"
FW_SERVICES_EXT_UDP="4662 4672"
Note that you should keep ports that are already in there.

After making these changes, you can restart the SuSEfirewall2 by doing:
# /sbin/SuSEfirewall2 stop; /sbin/SuSEfirewall2 start
(thanks g-maverick)

~~~~~~~~~~

All this works in SuSE 8.2, I don't know about other versions (especially non-8.x). Please correct me about anything you might find wrong/missing, I will change/add it.
« Last Edit: June 30, 2004, 10:09:41 PM by tuxlover »
Logged

g-maverick

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 11
Re: [howto] LowID: open/forward port on your SuSE router/client
« Reply #1 on: June 30, 2004, 07:55:36 PM »

instead of starting yast and klicking throug all the dialoguies, you also can use:

(as root)
/sbin/SuSEfirewall2 stop
and after this
/sbin/SuSEfirewall2 start
Logged

tuxlover

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 5
Re: [howto] LowID: open/forward port on your SuSE router/client
« Reply #2 on: June 30, 2004, 10:05:35 PM »

Watch out:
SuSEfirewall2 stop

! Don't do this if you're remotely connected !

Depending on your configuration, this will terminate your connection, and will leave the remote machine in an inaccessible way.

At least, launch all commands at once, like this:
/sbin/SuSEfirewall2 stop; /sbin/SuSEfirewall2 start

(WHY is there no restart option?)

Other than that - thanks g-maverick, I added this info to my original post.
« Last Edit: June 30, 2004, 10:10:27 PM by tuxlover »
Logged