<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Linux iptables on P3041 in P-Series</title>
    <link>https://community.nxp.com/t5/P-Series/Linux-iptables-on-P3041/m-p/241601#M392</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are running linux on one of the cores of the P3041, can the ethernet controller ports for the processor be configured with standard linux iptables so you can basically run a router on that core?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Dec 2013 21:24:51 GMT</pubDate>
    <dc:creator>akolega</dc:creator>
    <dc:date>2013-12-03T21:24:51Z</dc:date>
    <item>
      <title>Linux iptables on P3041</title>
      <link>https://community.nxp.com/t5/P-Series/Linux-iptables-on-P3041/m-p/241601#M392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are running linux on one of the cores of the P3041, can the ethernet controller ports for the processor be configured with standard linux iptables so you can basically run a router on that core?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Dec 2013 21:24:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Linux-iptables-on-P3041/m-p/241601#M392</guid>
      <dc:creator>akolega</dc:creator>
      <dc:date>2013-12-03T21:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: Linux iptables on P3041</title>
      <link>https://community.nxp.com/t5/P-Series/Linux-iptables-on-P3041/m-p/241602#M393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could configure the specific ethernet ports in Linux with iptable to make the core run IP Forward and NAT, please refer to the following demo.&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;[root@p4080 root]# ifconfig fm2-gb0 192.168.2.130 netmask 255.255.255.0 up&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;[root@p4080 root]# ifconfig fm2-gb1 192.168.1.131 netmask 255.255.255.0 up&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;[root@p4080 root]# ifconfig&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;fm2-gb0 Link encap:Ethernet HWaddr 00:E0:0C:00:AA:05&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inet addr:192.168.2.130 Bcast:192.168.2.255 Mask:255.255.255.0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RX packets:0 errors:0 dropped:0 overruns:0 frame:0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TX packets:0 errors:0 dropped:0 overruns:0 carrier:0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; collisions:0 txqueuelen:1000&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RX bytes:0 (0.0 Kb) TX bytes:0 (0.0 b)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Memory:fe5e0000-fe5e0fff&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;fm2-gb1 Link encap:Ethernet HWaddr 00:E0:0C:00:AA:06&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inet addr:192.168.1.131 Bcast:192.168.1.255 Mask:255.255.255.0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RX packets:0 errors:0 dropped:0 overruns:0 frame:0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TX packets:0 errors:0 dropped:0 overruns:0 carrier:0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; collisions:0 txqueuelen:1000&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RX bytes:0 (0.0 Kb) TX bytes:0 (0.0 b)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Memory:fe5e0000-fe5e0fff&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;lo&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Link encap:Local Loopback&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inet addr:127.0.0.1 Mask:255.0.0.0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UP LOOPBACK RUNNING MTU:16436 Metric:1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RX packets:0 errors:0 dropped:0 overruns:0 frame:0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TX packets:0 errors:0 dropped:0 overruns:0 carrier:0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; collisions:0 txqueuelen:0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;[root@p4080 root]#&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;[root@p4080 root]# arp -s 192.168.2.131 00:00:05:00:00:01&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;[root@p4080 root]# arp -s 192.168.1.130 00:00:06:00:00:01&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;[root@p4080 root]# echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;[root@p4080 root]# iptables -F INPUT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;[root@p4080 root]# iptables -F OUTPUT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;[root@p4080 root]# iptables -F FORWARD&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;[root@p4080 root]# iptables -t nat -F PREROUTING&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;[root@p4080 root]# iptables -t nat -F POSTROUTING&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;[root@p4080 root]# iptables -P INPUT ACCEPT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;[root@p4080 root]# iptables -P OUTPUT ACCEPT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;[root@p4080 root]# iptables -P FORWARD ACCEPT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;[root@p4080 root]# iptables -t nat -A POSTROUTING -p tcp -o fm2-gb1 -m iprange --src-range \&lt;/SPAN&gt;&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;192.168.2.1-192.168.2.255 -j SNAT --to-source 9.5.2.1-9.5.2.255:1724-1755&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;[root@p4080 root]# iptables -L&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;Chain INPUT (policy ACCEPT)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;target prot opt source destination&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;Chain FORWARD (policy ACCEPT)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;target prot opt source destination&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;Chain OUTPUT (policy ACCEPT)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;target prot opt source destination&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;[root@p4080 root]# iptables -L -t nat&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;Chain PREROUTING (policy ACCEPT)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;target prot opt source destination&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;Chain POSTROUTING (policy ACCEPT)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;target prot opt source&amp;nbsp;&amp;nbsp; destination&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;SNAT&amp;nbsp;&amp;nbsp; tcp --&amp;nbsp; anywhere anywhere&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; source IP range 192.168.2.1-192.168.2.255 to:9.5.2.1-9.5.2.255:1724-1755&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;Chain OUTPUT (policy ACCEPT)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;target prot opt source destination&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 5.0pt; font-family: 'Courier New'; color: #51626f;"&gt;[root@p4080 root]#&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2013 09:31:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Linux-iptables-on-P3041/m-p/241602#M393</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2013-12-12T09:31:53Z</dc:date>
    </item>
  </channel>
</rss>

