Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]amule + upnp : how can I set iptables?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
magowiz
Veteran
Veteran


Joined: 17 Feb 2005
Posts: 1029
Location: Italy/Milan/Bresso

PostPosted: Fri Nov 20, 2009 2:50 pm    Post subject: [SOLVED]amule + upnp : how can I set iptables? Reply with quote

Hi,
I recently bought a router and it supports upnp so I thought to use upnp with amule to auto-open needed ports, all works well when iptables is stopped but if iptables is running , amule fails to use upnp.
I read in amule settings that upnp port is 50000 so I added to mine iptables this rule :
Code:
-A INPUT -p udp -m udp --dport 50000 -j ACCEPT

but it didn't work .

How can I discover which ports are needed to make amule+upnp works without problems ?


Last edited by magowiz on Sat Nov 21, 2009 7:31 am; edited 1 time in total
Back to top
View user's profile Send private message
luispa
Guru
Guru


Joined: 17 Mar 2006
Posts: 359
Location: España

PostPosted: Sat Nov 21, 2009 6:52 am    Post subject: Reply with quote

I would suggest you install a log action as your penultimate action before DROP, look at mine:

Code:
   iptables -N log
   iptables -A INPUT    -j log
   iptables -A FORWARD  -j log
   iptables -A OUTPUT   -j log

   iptables -A log      -j LOG  --log-level info --log-prefix "log -- DROP "

   iptables -A log      -j DROP


Then monitor your syslog and find which packets are being dropped

Luis
Back to top
View user's profile Send private message
magowiz
Veteran
Veteran


Joined: 17 Feb 2005
Posts: 1029
Location: Italy/Milan/Bresso

PostPosted: Sat Nov 21, 2009 6:54 am    Post subject: Reply with quote

Thanks for the suggestion, I'll try it !
Back to top
View user's profile Send private message
magowiz
Veteran
Veteran


Joined: 17 Feb 2005
Posts: 1029
Location: Italy/Milan/Bresso

PostPosted: Sat Nov 21, 2009 7:31 am    Post subject: Reply with quote

Thanks to your suggestion I found which rule I have to add to iptables to let upnp pass ,
I found that mine router responds to upnp requests using its port 1900 but mine host change port every time, so I added a rule that accepts all packets from mine router IP and port 1900 udp , like this :
Code:
-A INPUT -p udp -m udp -s <mine-router-ip> --sport 1900 -j ACCEPT


And it worked ;)
Back to top
View user's profile Send private message
luispa
Guru
Guru


Joined: 17 Mar 2006
Posts: 359
Location: España

PostPosted: Sat Nov 21, 2009 7:33 am    Post subject: Reply with quote

Great ;-)

Luis
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum