Open alaa2003 opened 6 years ago
in case run udp2raw it works normal, in case execute " amportal restart " i got udp2raw disconnect then connect then disconnect and so on.. why other affect on udp2raw! ?
Hi, when you run udp2raw with -a
option, udp2raw adds an iptables rule for you.
Looks like the amportal restart
reloaded your iptables rules. If you run iptables-save
before/after amportal restart
you will see the difference.
I suggest you to take a look at the -g
option, and add the necessary iptables rule manually.
The key is to make the iptables rule persist during amportal restart
. I never used this Linux distribution before, so I cant tell you exactly what command to run.
Or you can simply restart udp2raw after you restared amportal.
Or you can simply restart udp2raw after you restared amportal.
you are right, in case stop then start udp2raw again it works. but because i start udp2raw from init service on boot, i noticed it started first then amportal start but once amportal start it seems it reload iptables like you mentioned then we face issue of udp2raw i will try your -g option and inform you --gen-add --keep-rule
--keep-rule
This is a nasty option implemented in a dirty way. It does work but not very efficient, I suggest you to not use it.
here are iptables-save output : 1- after Freepbx Distro booted (before run udp2raw)
2- iptables with udp2raw running -a option
3- iptables after amportal restart as you see rules of udp2raw has been deleted by amportal restart! as you mentioned 4- using -g option with udp2raw to generate iptable rule then add it manually i tried udp2raw and it connected
5- iptables after amportal restart
as you see amportal cleared all iptables once restart it and cause udp2raw disconnection any idea ?
as you see amportal cleared all iptables once restart it and cause udp2raw disconnection
Of course this wont work.
The key is to make the iptables rule persist during amportal restart. I never used this Linux distribution before, so I cant tell you exactly what command to run.
I meant:
add the iptables rule manually in a way which makes it persistent during amportal restart
.
Now the real problem is not about how to use udp2raw, its about how to use amportal. You have to find a way to let amportal NOT delete your iptables rules.
i agree with you 100% temporary i added nice script untill fix issue of amportal i will suppose i uploaded udp2raw service at /etc/init.d/ with X permission 1- un-checked udp2raw from starting on boot in case it marked chkonfig udp2raw off 2-nano raw.sh
#!/bin/sh
/etc/init.d/udp2raw start > /root/u.log
3- chmod +x raw.sh 4- add cronjob to execute every 5 minutes , mostly amportal start auto after boot and after 2 minutes is done, then cronjob start raw.sh after 5 mins crontab -e /5 * sh /root/raw.sh
to monitor log tail -f /root/u.log
issue fixed after uninstall firewall from freepbx GUI modules i added iptable rule by -g option set udp2raw to start on boot again here is pic of iptables after boot its working like a charm :)))))) thank you wangyu
i suggest you hide your ip and other info before post it on public place...
hi freepbx Distro ISO is CentOS7 https://www.freepbx.org/downloads/
in case run udp2raw it works normal, in case execute " amportal restart " i got udp2raw disconnect then connect then disconnect and so on.. why other affect on udp2raw! ? hope to check and fix i used last built 25-02-2018 i tried in two different clients PC & in different countries Video: http://www47.zippyshare.com/v/C9tUXHm4/file.html https://www.sendspace.com/file/6du54m http://www.mediafire.com/file/vj7ttpy20dxkmj7/udp2raw%20freepbx%20amportal%20bug.mp4