Hi,
I compiled and installed deb packages as per the sipwise guide here https://github.com/sipwise/rtpengine. After running modprobe xt_MEDIAPROXY and iptables -I INPUT -p udp -j MEDIAPROXY --id 0 the new chain created is mediaproxy (lower case). Isn't iptables case sensitive? I'm not sure that it is working properly since it seems the mediaproxy chain (lowercase) sends all UDP packets through the MEDIAPROXY (uppercase) chain, which apparently didn't get created.
How can I check to make sure that indeed RTPengine is relaying the streams properly?
Thanks
Here's what my iptables looks like after running modprobe xt_MEDIAPROXY and iptables -I INPUT -p udp -j MEDIAPROXY --id 0
*ncoming packets (INPUT) - Only applies to packets addressed to this host* Select all. https://securvoice.eu:9998/firewall/index.cgi?table=0# | Invert selection. https://securvoice.eu:9998/firewall/index.cgi?table=0# * https://securvoice.eu:9998/firewall/index.cgi?table=0#**Action https://securvoice.eu:9998/firewall/index.cgi?table=0#**Condition https://securvoice.eu:9998/firewall/index.cgi?table=0#**Move https://securvoice.eu:9998/firewall/index.cgi?table=0#**Add https://securvoice.eu:9998/firewall/index.cgi?table=0#*Jump to chain MEDIAPROXY https://securvoice.eu:9998/firewall/edit_rule.cgi?table=0&idx=0If protocol is *UDP* https://securvoice.eu:9998/firewall/edit_rule.cgi?table=0&chain=INPUT&new=1&after=0 https://securvoice.eu:9998/firewall/edit_rule.cgi?table=0&chain=INPUT&new=1&before=0Select all. https://securvoice.eu:9998/firewall/index.cgi?table=0# | Invert selection. https://securvoice.eu:9998/firewall/index.cgi?table=0# Accept Drop Userspace Exit chain ------------------------------ *Forwarded packets (FORWARD) - Only applies to packets passed through this host* *There are no rules defined for this chain.* Accept Drop Userspace Exit chain ------------------------------ *Outgoing packets (OUTPUT) - Only applies to packets originated by this host* *There are no rules defined for this chain.* Accept Drop Userspace Exit chain ------------------------------ *Chain mediaproxy* Select all. https://securvoice.eu:9998/firewall/index.cgi?table=0# | Invert selection. https://securvoice.eu:9998/firewall/index.cgi?table=0# * https://securvoice.eu:9998/firewall/index.cgi?table=0#**Action https://securvoice.eu:9998/firewall/index.cgi?table=0#**Condition https://securvoice.eu:9998/firewall/index.cgi?table=0#**Move https://securvoice.eu:9998/firewall/index.cgi?table=0#**Add https://securvoice.eu:9998/firewall/index.cgi?table=0#*Jump to chain MEDIAPROXY https://securvoice.eu:9998/firewall/edit_rule.cgi?table=0&idx=1If protocol is *UDP*
On 08/09/14 09:14 AM, Peter Villeneuve wrote:
Hi,
I compiled and installed deb packages as per the sipwise guide here https://github.com/sipwise/rtpengine. After running modprobe xt_MEDIAPROXY and iptables -I INPUT -p udp -j MEDIAPROXY --id 0 the new chain created is mediaproxy (lower case). Isn't iptables case sensitive? I'm not sure that it is working properly since it seems the mediaproxy chain (lowercase) sends all UDP packets through the MEDIAPROXY (uppercase) chain, which apparently didn't get created.
How can I check to make sure that indeed RTPengine is relaying the streams properly?
I would blame whatever iptables frontend you're using there. FTR, "MEDIAPROXY" isn't the name of an iptables chain, it's an iptables target extension, same as MIRROR for example. Hence uppercase. You don't need to create a new chain at all.
Note however that if you use the init.d script which is included in the Debian package, then that will create a new chain with a lower-case name for you.
The best way to check which rules and chains are really created on your system is on the command line: 'iptables -L -v -n'
If you want to check whether kernel forwarding works as it should, watch the contents of '/proc/mediaproxy/0/list'. With calls active, you should see forwarding rules there and the packet counters increasing.
cheers