MiniUPnPd Web Installer - Available For Testing

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
Author Message
autobot
DD-WRT Guru


Joined: 07 May 2009
Posts: 1596

PostPosted: Tue Dec 22, 2009 22:11    Post subject: Reply with quote
Thanks frater, I will try that out. You can integrate it, if you have any problems just let me know.
_________________
Eko Builds

BrainSlayer Builds

DD-WRT Changelog RSS Feed
Sponsor
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Tue Dec 22, 2009 22:22    Post subject: Reply with quote
Creating a prewall script only works when you know what you need to add. In this case the daemon is adding the rules, so you'd have to come up with a method to save the MINIUPNP chain to a prewall script if you go down that route.
_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Tue Dec 22, 2009 22:27    Post subject: Reply with quote
Is this running faster?

Code:
#!/bin/sh

# Output miniupnpd ruleset table in a format compatible with MyPage

/jffs/miniupnpd/miniupnpdctl | grep -B99 'Events details' | grep -A99 'struct ctlelem:' | tail -n+2 | head -n-2 >/tmp/.miniupnp

while read line
do
   
   protocol=$(echo $line | awk '{print $3}')
   sport=$(echo $line | awk '{print $4}' | awk -F"->" '{print $1}')
   ip=$(echo $line | awk '{print $4}' | awk -F"->" '{print $2}' | awk -F":" '{print $1}')
   dport=$(echo $line | awk '{print $4}' | awk -F"->" '{print $2}' | awk -F":" '{print $2}')
   desc=$(echo $line | awk -F"'" '{print $2}' | awk -F"'" '{print $1}')      
   
   host=`grep ${ip} /etc/hosts | awk '{print $2}'`   
   [ "$host" == "" ] && host=$ip
   
   echo "<tr><td>"$desc"</td><td>"$host"</td><td>"$sport"</td><td>"$dport"</td><td>"$ip"</td><td>"$protocol"</td></tr>"
   
done </tmp/.miniupnp
rm -f /tmp/.miniupnp

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Tue Dec 22, 2009 22:32    Post subject: Reply with quote
phuzi0n wrote:
Creating a prewall script only works when you know what you need to add. In this case the daemon is adding the rules, so you'd have to come up with a method to save the MINIUPNP chain to a prewall script if you go down that route.


He only needs to make his own chain in iptables and then he can manipulate his own chain....

If the firewall is restarted it needs to recreate the chains and rewrite all the rules...
This can be be done in that prewall....

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Tue Dec 22, 2009 22:47    Post subject: Reply with quote
frater wrote:
He only needs to make his own chain in iptables and then he can manipulate his own chain....

If the firewall is restarted it needs to recreate the chains and rewrite all the rules...
This can be be done in that prewall....

The chain just needs to be created before miniupnp runs which can be done in the firewall script. It's not the same as it was in your case where you had a list of predefined rules that you add every time.

_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Tue Dec 22, 2009 22:50    Post subject: Reply with quote
He can add rules and delete them without restarting the firewall. He just needs to recreate all the rules when the firewall is restarted. That's where the script comes in.....
_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Tue Dec 22, 2009 22:57    Post subject: Reply with quote
frater wrote:
He can add rules and delete them without restarting the firewall. He just needs to recreate all the rules when the firewall is restarted. That's where the script comes in.....

You're not getting it, all he does is set up the chain for miniupnp to use. He can create the MINIUPNP chain and the rules to jump to it perfectly fine from within the firewall script.

_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Tue Dec 22, 2009 23:14    Post subject: Reply with quote
autobot wrote:
Thanks frater, I will try that out. You can integrate it, if you have any problems just let me know.

I will wait until it's fully tested by some....

I'm still looking for a fix for my vmare machines that have slow network access when they access their host.

It seems "Virtual PC" is having the same issue but that fix they are offering doesn't work for me Sad
http://secondstanza.com/2008/08/26/vmware-slow-network-share-performance/

It sounds like a major issue but I'm only getting a few hits on google.... Maybe it's also hardware related. If anyone knows some more about this issue, please PM. I'm somehow unable to post anything on their forum

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
autobot
DD-WRT Guru


Joined: 07 May 2009
Posts: 1596

PostPosted: Tue Dec 22, 2009 23:57    Post subject: Reply with quote
I'm assuming if there are problems they will report, it has been downloaded about 150 times. But I would wait also, maybe another week and perhaps some reports will come in.
_________________
Eko Builds

BrainSlayer Builds

DD-WRT Changelog RSS Feed
MikeMcr
DD-WRT User


Joined: 28 Aug 2009
Posts: 54

PostPosted: Wed Dec 23, 2009 17:51    Post subject: Reply with quote
frater wrote:
Is this running faster?


frater, thanks for the revised script code. I will give it a try. I didn't know about the head and tail commands so that is really useful.

I actually found it was the "awk" command that is slow within the main loop.

I used nslookup because I wanted to resolve IPs to host names given out via DHCP (DNSMasq) and they are not in /etc/hosts. I suppose I could get them from the DNSMasq lease file which I have enabled.
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Wed Dec 23, 2009 19:18    Post subject: Reply with quote
MikeMcr wrote:
frater wrote:
Is this running faster?


frater, thanks for the revised script code. I will give it a try. I didn't know about the head and tail commands so that is really useful.

I actually found it was the "awk" command that is slow within the main loop.

I used nslookup because I wanted to resolve IPs to host names given out via DHCP (DNSMasq) and they are not in /etc/hosts. I suppose I could get them from the DNSMasq lease file which I have enabled.

It is also faster to use the the "done <filename" and there's another thing which I didn't know when I started bash-scripting.... if you invoke it like you did you will spawn another shell process and the variables you change/define there will not be visible after the loop ends....

My hosts are in /etc/hosts. Did you check this? I'm also using that file in my pound script....

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
autobot
DD-WRT Guru


Joined: 07 May 2009
Posts: 1596

PostPosted: Sat Dec 26, 2009 7:29    Post subject: Reply with quote
Has anyone had any problems yet with miniupnp?
_________________
Eko Builds

BrainSlayer Builds

DD-WRT Changelog RSS Feed
edrikk
DD-WRT User


Joined: 31 Oct 2009
Posts: 186
Location: Canada

PostPosted: Sat Dec 26, 2009 16:10    Post subject: Reply with quote
autobot wrote:
Has anyone had any problems yet with miniupnp?



Hi Autobot,

I'm on my cell, so can't type a full note, but I sent you an PM last night.

I'm not sure if something changed in the past week in your compile options (or even if that is relevant), but:

My PS3 sees the UPNP and ports and rules are added to iptable.
However, Call of Duty modern warfare 2 is no longer able to connect to the developer's servers for online games.

I switched back from my WRT610Nv2 to Tomato firmware on my WRT54G, which also runs miniupnp, and all was well immediately.


I also saw, but need to retest this when I get a chance, that after a day or so, the PS3 was no longer recognizing the UPnP even though the miniupnp daemon was still up. A reboot of dd-wrt was needed to fix that.

It is weird, because when the PS3 no longer sees the upnp, Call of duty IS able to connect to the servers. I know this because in the menu in that case call of duty says that NAT type is "moderate". Normally, when upnp is working (eg Tomato) it would say "open".
I hope I explained myself semi-well.


Last edited by edrikk on Sat Dec 26, 2009 16:22; edited 1 time in total
autobot
DD-WRT Guru


Joined: 07 May 2009
Posts: 1596

PostPosted: Sat Dec 26, 2009 16:13    Post subject: Reply with quote
Hey edrikk, yes I pm'd you the solution...but It's not necessary because I fixed the daemon.
_________________
Eko Builds

BrainSlayer Builds

DD-WRT Changelog RSS Feed
autobot
DD-WRT Guru


Joined: 07 May 2009
Posts: 1596

PostPosted: Sat Dec 26, 2009 16:19    Post subject: Reply with quote
The problem should be resolved now.
_________________
Eko Builds

BrainSlayer Builds

DD-WRT Changelog RSS Feed
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next Display posts from previous:    Page 4 of 8
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
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
You can attach files in this forum
You can download files in this forum