<p>Thank you all for the good tips. I found the issue! Luckily not an issue with Kamailio after all. The issue is that Linux enables reverse path filtering by default. I tried to substitute Kamailio with a simple Python server, and I noticed that it wasn't showing me any output either. So I started digging around in the Linux settings and found that we needed to disable reverse path filtering.</p>
<p>The Python script used to substitute Kamailio:</p>
<div class="highlight highlight-source-python"><pre><span class="pl-k">import</span> socket
sock <span class="pl-k">=</span> socket.socket(socket.<span class="pl-c1">AF_INET</span>, socket.<span class="pl-c1">SOCK_DGRAM</span>)
sock.bind((<span class="pl-s"><span class="pl-pds">'</span>0.0.0.0<span class="pl-pds">'</span></span>, <span class="pl-c1">5060</span>))

<span class="pl-k">while</span> <span class="pl-c1">True</span>:
        data, addr <span class="pl-k">=</span> sock.recvfrom(<span class="pl-c1">1024</span>)
        <span class="pl-c1">print</span> <span class="pl-s"><span class="pl-pds">"</span>Received message:<span class="pl-pds">"</span></span>, data</pre></div>
<p>More information about reverse path filtering:<br>
<a href="https://www.tldp.org/HOWTO/Adv-Routing-HOWTO/lartc.kernel.rpf.html" rel="nofollow">https://www.tldp.org/HOWTO/Adv-Routing-HOWTO/lartc.kernel.rpf.html</a></p>
<p>I guess we missed this setting during migration. If it helps anyone in the future, to disable remote path filtering (at your own risk, obviously):</p>
<div class="highlight highlight-source-shell"><pre><span class="pl-k">for</span> <span class="pl-smi">interface</span> <span class="pl-k">in</span> /proc/sys/net/ipv4/conf/<span class="pl-k">*</span>/rp_filter<span class="pl-k">;</span> <span class="pl-k">do</span>
<span class="pl-c1">echo</span> 1 <span class="pl-k">></span> <span class="pl-smi">${interface}</span>
<span class="pl-k">done</span></pre></div>
<p>To be clear, the <code>mhomed</code> setting is not mandatory and in our case not desired.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1703#issuecomment-435702912">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZezUIKn9PoparKXsCPTsWEx4LibAks5ur03agaJpZM4YIGmp">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZXUl4tu_Qc3ui6a6VGe86b_zaxffks5ur03agaJpZM4YIGmp.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@ThomasLobker in #1703: Thank you all for the good tips. I found the issue! Luckily not an issue with Kamailio after all. The issue is that Linux enables reverse path filtering by default. I tried to substitute Kamailio with a simple Python server, and I noticed that it wasn't showing me any output either. So I started digging around in the Linux settings and found that we needed to disable reverse path filtering.\r\n\r\nThe Python script used to substitute Kamailio:\r\n```python\r\nimport socket\r\nsock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)\r\nsock.bind(('0.0.0.0', 5060))\r\n\r\nwhile True:\r\n\tdata, addr = sock.recvfrom(1024)\r\n\tprint \"Received message:\", data\r\n```\r\n\r\nMore information about reverse path filtering:\r\nhttps://www.tldp.org/HOWTO/Adv-Routing-HOWTO/lartc.kernel.rpf.html\r\n\r\nI guess we missed this setting during migration. If it helps anyone in the future, to disable remote path filtering (at your own risk, obviously):\r\n\r\n```bash\r\nfor interface in /proc/sys/net/ipv4/conf/*/rp_filter; do\r\necho 1 \u003e ${interface}\r\ndone\r\n```\r\n\r\nTo be clear, the `mhomed` setting is not mandatory and in our case not desired."}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1703#issuecomment-435702912"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/1703#issuecomment-435702912",
"url": "https://github.com/kamailio/kamailio/issues/1703#issuecomment-435702912",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "Re: [kamailio/kamailio] Issues with single Kamailio process in two networks/vlans (#1703)",
"sections": [
{
"text": "",
"activityTitle": "**Thomas Lobker**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@ThomasLobker",
"facts": [

]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"kamailio/kamailio\",\n\"issueId\": 1703,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/kamailio/kamailio/issues/1703#issuecomment-435702912"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 404777385\n}"
}
],
"themeColor": "26292E"
}
]</script>