Comments (39)
to be honest, we didn't check captagent in IPv6, but i don't see any reason, why it should not work:
in the core_hep.c, we do:
if ((s = getaddrinfo(capt_host, capt_port, hints, &ai)) != 0) {
LERR( "capture: getaddrinfo: %s\n", gai_strerror(s));
return 2;
}
if((sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol)) < 0) {
LERR("Sender socket creation failed: %s\n", strerror(errno));
return 1;
}
if (connect(sock, ai->ai_addr, (socklen_t)(ai->ai_addrlen)) == -1) {
select(sock + 1 , NULL, &myset, NULL, &tv);
if (errno != EINPROGRESS) {
LERR("Sender socket creation failed: %s\n", strerror(errno));
return 1;
}
}
as you see, getaddrinfo return a struct addressinfo base on the capt_host. So, if your capt_host can be resolved as IPV6 and ai_family set to IPv6 , socket() will open IPv6.
from captagent.
unfortunately it does not capture anything on an V6 interface.
so far we used "any" as Interface and if no filter set i can see at least the V4 traffic, but if i bind it to the V6 Inteface it just makes nothing.
In Log i can see this during restart the service:
@4000000054c5f0933077a56c The agent has been terminated
@4000000054c5f093307cb264 Loaded core config
@4000000054c5f093307cb264 Loaded core_hep
@4000000054c5f093307cb64c Loaded proto_uni
@4000000054c5f093307cb64c The Captagent is ready
@4000000054c5f093307cba34 expr:portrange 5060-5090 and udp
@4000000054c5f093307cba34 unloaded module proto_uni
@4000000054c5f093307cba34 unloaded module core_hep
@4000000054c5f093307cbe1c count sends:0
@4000000054c5f093307cbe1c DONE unload
For me "Unload" during stating procedure doesn't look so good. Maybe it should be like this but i'm not sure.
would be great if you can give us a hint what to do.
BR
Jöran Vinzens
from captagent.
Are you able to see traffic with tcpdump/ngrep ?
On 2015-01-26 08:49, vinzens wrote:
unfortunately it does not capture anything on an V6 interface.
so far we used "any" as Interface and if no filter set i can see at
least teh V4 traffic, but if i bind it to the V6 Inteface it just
makes nothing.In Log i can see this during restart the service:
|@4000000054c5f0933077a56c The agent has been terminated
@4000000054c5f093307cb264 Loaded core config
@4000000054c5f093307cb264 Loaded core_hep
@4000000054c5f093307cb64c Loaded proto_uni
@4000000054c5f093307cb64c The Captagent is ready
@4000000054c5f093307cba34 expr:portrange 5060-5090 and udp
@4000000054c5f093307cba34 unloaded module proto_uni
@4000000054c5f093307cba34 unloaded module core_hep
@4000000054c5f093307cbe1c count sends:0
@4000000054c5f093307cbe1c DONE unload
|For me "Unload" during stating procedure doesn't look so good. Maybe
it should be like this but i'm not sure.
would be great if you can give us a hint what to do.BR
Jöran Vinzens—
Reply to this email directly or view it on GitHub
#6 (comment).
from captagent.
yes, i am. we started debugging with ngrep since it's our first time to have IPv6 and now we wanted to have the traffic in our Homer. So i'm very certain that there is traffic and we are able to see it by using ngrep.
here a little output from tcpdump
root@server:~# tcpdump host 2001:ab0:1413:affe::aa01 -i any -n
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes
09:09:12.870847 IP6 2001:ab0:1413:affe::aa01.5060 > 2a01:4f8:211:2203::2.16732: SIP, length: 1436
09:09:12.881478 IP6 2a01:4f8:211:3::2.16732 > 2001:ab0:1413:affe::aa01.5060: SIP, length: 999
09:09:13.432248 IP6 2a01:4f8:211:3::2.16732 > 2001:ab0:1413:affe::aa01.5060: SIP, length: 1015
from captagent.
in your config, please comment out port, ip-proto and make a custom filter and activate debug
section: proto_uni.conf
<!--
<param name="ip-proto" value="udp"/>
<param name="port" value="5060"/>
-->
<param name="filter" value="host 2001:ab0:1413:affe::aa01"/>
<param name="debug" value ="true"/>
<param name="dev" value="any"/>
and core.conf:
<param name="debug" value="7"/>
<param name="daemon" value="true"/>
<param name="syslog" value="true"/>
after, please check if you will have something in your syslog.
thanks
from captagent.
No, unfortunately i cannot find anythin new in the log except this:
@4000000054c60bf017ace3e4 Loaded core config
@4000000054c60bf017ace7cc Loaded core_hep
@4000000054c60bf017ace7cc Loaded proto_uni
@4000000054c60bf017acebb4 The Captagent is ready
@4000000054c60bf017acebb4 expr:portrange 5060-5090 and udp and host 2001:ab0:13:affe::aa01
@4000000054c60bf017acef9c unloaded module proto_uni
@4000000054c60bf017acef9c unloaded module core_hep
@4000000054c60bf017acf384 count sends:0
@4000000054c60bf017acf384 DONE unload
But this seems to be quite the same just except the Host Filter
from captagent.
you didn't comment out ip-proto and port/portrange.
from captagent.
yes, sorry.
now i got this:
@4000000054c60fcc1b395e34 Loaded core config
@4000000054c60fcc1b395e34 Loaded core_hep
@4000000054c60fcc1b39621c Loaded proto_uni
@4000000054c60fcc1b39621c The Captagent is ready
@4000000054c60fcc1b396604 expr:port 5060 and host 2001:ab0:13:affe::aa01
@4000000054c60fcc1b396604 unloaded module proto_uni
@4000000054c60fcc1b3969ec unloaded module core_hep
@4000000054c60fcc1b3969ec count sends:0
@4000000054c60fcc1b3969ec DONE unload
if i uncomment Port or Portrange it takes by default port 5060 so my filter must look like "and host ..." else i get an error for the filter syntax.
Bit in my case SIP is on Port 5060 so it should not permit the data.
Still it's not working
from captagent.
i have added more debug, can you please pull the last git and start again ? Please be sure that you have activated debug in the proto_uni section.
thanks.
from captagent.
this doesn't look any better.
I cloned the git and made installation according your README.
started the captagent with
captagent -f /usr/local/etc/captagent/captagent.xml
in syslog all i can find is:
Jan 26 12:03:32 kammel captagent[14675]: [NOTICE] DONE unload
Jan 26 12:04:24 kammel captagent[14683]: [NOTICE] The Captagent is ready
if i do not daemonize the captagent i can see this in console:
Loaded core_hep
Loaded proto_uni
expr:port 5060 and host 2001:ab0:13:affe::aa01
unfortunately nothing else
please find below the config file (maybe there is something wrong in it):
<configuration name="core.conf" description="CORE Settings">
<settings>
<param name="debug" value="7"/>
<param name="daemon" value="false"/>
<param name="syslog" value="true"/>
<param name="path" value="/usr/lib/captagent/modules"/>
</settings>
</configuration>
<configuration name="modules.conf" description="Modules">
<modules>
<load module="core_hep"/>
<load module="proto_uni"/>
</modules>
</configuration>
<!-- CORE MODULES -->
<configuration name="core_hep.conf" description="HEP Socket">
<settings>
<param name="version" value="3"/>
<param name="capture-host" value="homer02.sipgate.net"/>
<param name="capture-port" value="9060"/>
<param name="capture-proto" value="udp"/>
<param name="payload-compression" value="false" />
<param name="capture-id" value="kammel"/>
<param name="capture-password" value="kammelMyHep2001"/>
</settings>
</configuration>
<!-- PROTOCOLS -->
<configuration name="proto_uni.conf" description="UNI Proto Basic capture">
<settings>
<!-- <param name="port" value="5060"/> -->
<!-- <param name="portrange" value="5060-5090"/> -->
<param name="debug" value="true"/>
<param name="dev" value="any"/>
<param name="promisc" value="true"/>
<!-- <param name="ip-proto" value="udp"/> -->
<param name="proto-type" value="sip"/>
<param name="sip_method" value="!OPTIONS"/>
<!-- <param name="sip_subscribe_method" value="!SUBSCRIBE"/> -->
<param name="filter" value="and host 2001:ab0:13:affe::aa01"/>
</settings>
</configuration>
from captagent.
can u please download https://github.com/sipcapture/sipgrep and run the same filter ?
it looks very weird for me, because there is no packets at all...
from captagent.
sipgrep does not show the packets, too.
I now made trace on tcpdump and sipgrep at the same time on that mashin, zo ensure the SIP V6 Traffic is passing this system as expected.
made sure the IP is correct:
sudo ifconfig|grep "2001:ab0:13:affe::aa01"
inet6 addr: 2001:ab0:13:affe::aa01/64 Scope:Global
enabled sipgrep like
sudo sipgrep -d any host 2001:ab0:13:affe::aa01
interface: any
filter: (ip) and ( host 2001:ab0:13:affe::aa01 )
nothing....
where tcpdump gave output
tcpdump -i any host 2001:ab0:13:affe::aa01
13:04:42.263148 IP6 2001:ab0:13:affe::aa01.5060 > 2a01:4f8:211:2203::2.16732: SIP, length: 1419
13:04:42.273637 IP6 2a01:4f8:211:2203::2.16732 > 2001:ab0:13:affe::aa01.5060: SIP, length: 999
...
...
from captagent.
unfortunatley you didn't define --enable-ipv6 for sipgrep.
from captagent.
ok, i made it again:
- make clean
- ./configure --enable-ipv6
- make && sudo make install
- sudo sipgrep -d any host 2001:ab0:13:affe::aa01
same result
from captagent.
please show me the output of sudo sipgrep -d any host 2001:ab0:13:affe::aa01
from captagent.
it looks like:
vinzens@server:/sipgrep$ sudo sipgrep -d any host 2001:ab0:13:affe::aa01/sipgrep$
interface: any
filter: (ip or ip6) and ( host 2001:ab0:13:affe::aa01 )
^Cvinzens@server:
i placed a call between starting and stoppung the trace. tcpdump again showed packets.
from captagent.
ok, I have to setup IPv6 and check it by self.This can take a while.
from captagent.
OK, many thanks for your help! We'll wait for your feedback.
from captagent.
Hi, have you made any progress in this issue? If you need someone to test something, please let us know.
Best regards
from captagent.
not yet. but if you can provide an ssh w/root credentials, we can speed up it
from captagent.
Unfortunately this is not possible since our security policy does not allow this on Live systems. So far we do not have a DEV setup.
Sorry
So we will wait.
from captagent.
Hi again,
finally we have installed captagent V6. Since i cannot find any docu about IPv6 config here the question:
How do i configure the socket_pcap in order to get IPv6 Packets? At the moment it looks pritty much like your sample, but im not able to get IPv6 sniffed.
filter in socket_pcap looks like:
<param name="filter">
<value>ip6</value>
</param>
do you have any hints?
from captagent.
When looking into this, I saw there were some lines in the code, which were only compiled if a precompiler variable USE_IPv6 is set. But this variable was never set.
I tried adding an option to configure, you can now call it with --enable-ipv6, then the following line is written:
src/config.h:#define USE_IPv6 1
Then I replaced all the #if USE_IPv6 lines with #ifdef USE_IPv6. Maybe this wasn't necessary but it doesn't hurt.
After building the debian package and installing, I still only get IPv4 output. I'm out of ideas, what is needed to get IPv6 support up and running.
You can find my work here:
https://github.com/SipSeb/captagent/tree/ipv6
Since it isn't working, I haven't sent a pull request.
Do you have any more hints what is missing?
from captagent.
I talked about this issue at KamailioWorld with @lmangani, and he told me that he knows what the problem is and how it can be fixed. Are there any plans to make IPv6 in captagent work?
from captagent.
Hi Sebastian,
can you provide ssh to any Ipv6 box with sip traffic and we can check it together ?
you can ping me also in gtalk.
from captagent.
Actually, that's a bit difficult. But @lmangani said, he knows what to do and he has an IPv6 setup.
Otherwise, you could come visit us for a day, then we could look at it together.
from captagent.
@SipSeb that's indeed correct - testing resumed ;)
from captagent.
@SipSeb can you try the last git ? Should works now
from captagent.
please don't forget to enable ipv6
./configure --enable-ipv6
from captagent.
Sorry for the late reply, but the sipcapture job on our build system is currently broken. I'm gonna try as soon as I get to it.
from captagent.
Wow, that libuv dependency makes it hard to test right now. Need to upgrade the IPv6 system from wheezy to jessie first. ;)
from captagent.
Why ?
https://github.com/sipcapture/captagent/tree/master/dependency/debian/wheezy
from captagent.
Yes, I've seen that. But for wheezy the libuv-dev package is missing which is probably needed for building captagent, and the other reason is that our build system expects those build dependencies in some repository. It's not that easy unfortunately.
from captagent.
this is custom package and it already includes dev as well...
On 01.07.2016 15:26, Sebastian Damm wrote:
Yes, I've seen that. But for wheezy the libuv-dev package is missing
which is probably needed for building captagent, and the other reason
is that our build system expects those build dependencies in some
repository. It's not that easy unfortunately.—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
#6 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AETdJeLfCMDc5Of6vkN5lCkP9dXiDMxAks5qRRV7gaJpZM4DWYuK.
from captagent.
any progress ?
from captagent.
Yes. I managed to backport the libuv package from jessie-backports and put it in our repository. So now I have a running captagent on Wheezy.
The good thing: It now captures IPv6 packets. 👍
The bad thing: New bug, I can't use hostnames in my transport_hep.xml anymore. In our previous version built in January (and before with the old captagent) we could use hostnames in there. Now if we leave the configuration unchanged, captagent sends all packets to 127.0.0.1. Should I open a new bug for this issue?
from captagent.
yes please ;-)
i know, the function of libuv doesn't accept hostname as param. Please open
as a CR not as a bug ;-)
Wbr,
Alexandr
On 13 July 2016 at 09:35, Sebastian Damm [email protected] wrote:
Yes. I managed to backport the libuv package from jessie-backports and put
it in our repository. So now I have a running captagent on Wheezy.The good thing: It now captures IPv6 packets. 👍
The bad thing: New bug, I can't use hostnames in my transport_hep.xml
anymore. In our previous version built in January (and before with the old
captagent) we could use hostnames in there. Now if we leave the
configuration unchanged, captagent sends all packets to 127.0.0.1. Should I
open a new bug for this issue?—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
#6 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AETdJZI7WuW3TP1oD_LfsneCVBQyYP2zks5qVJU9gaJpZM4DWYuK
.
from captagent.
Isn't CR vs. bug only a thing of labels attached to the issus? Or did you mean something else? Anyway, I've opened an issue. If this was wrong, just let me know.
I'm going to close this bug (if I'm allowed to).
from captagent.
so, looks like the ticket can be closed. Please reopen if anything.
from captagent.
Related Issues (20)
- captagent[3276431]: [ERR] protocol_sip.c:141 Couldnot find this call HOT 29
- Captagent Problem on Debian 11 HOT 5
- Problem with systemd captagent HOT 7
- TLS doesn't work for captagent HOT 1
- Multiple transport profiles HOT 6
- Captagent crashed: double free or corruption HOT 4
- Can not compile - Missing files? HOT 2
- Сaptagent does not capture traffic destined for the ipsec tunnel HOT 1
- captagent 6.4.1 DEB Missing the package dependencies: error while loading shared libraries: libfl.so.2: HOT 1
- Centos7 compile error HOT 8
- Is --enable-mysql option working ? HOT 4
- TODO: remove MySQL feature as not supported anymore
- "TLS has been not enabled." - even after fresh reinstall HOT 3
- Segmentation fault when specify a specific filter with Captagent 6.4.1 HOT 9
- segfault at 0 ip 00007f480b0167de sp 00007f480a40ec00 error 4 in socket_pcap.so HOT 15
- Segmentation fault socket_pcap.c Captagent 6.4.1 HOT 3
- Segfault with captagent version 6.4.1 on Debian 11 HOT 16
- have problem with debian 12 and capagent HOT 2
- [ERR] protocol_sip.c:141 This is not DIAMETER HOT 7
- Missing some parts of SIP header and the entire SDP in HEP message HOT 17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from captagent.