<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>http://wiki.ciscolinux.co.uk/index.php?action=history&amp;feed=atom&amp;title=Linux_enable_packet_forwarding</id>
	<title>Linux enable packet forwarding - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.ciscolinux.co.uk/index.php?action=history&amp;feed=atom&amp;title=Linux_enable_packet_forwarding"/>
	<link rel="alternate" type="text/html" href="http://wiki.ciscolinux.co.uk/index.php?title=Linux_enable_packet_forwarding&amp;action=history"/>
	<updated>2026-04-05T18:47:50Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.2</generator>
	<entry>
		<id>http://wiki.ciscolinux.co.uk/index.php?title=Linux_enable_packet_forwarding&amp;diff=1653&amp;oldid=prev</id>
		<title>Pio2pio: Pio2pio moved page IP forwarding to Linux enable packet forwarding</title>
		<link rel="alternate" type="text/html" href="http://wiki.ciscolinux.co.uk/index.php?title=Linux_enable_packet_forwarding&amp;diff=1653&amp;oldid=prev"/>
		<updated>2015-03-06T20:04:51Z</updated>

		<summary type="html">&lt;p&gt;Pio2pio moved page &lt;a href=&quot;/index.php?title=IP_forwarding&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;IP forwarding (page does not exist)&quot;&gt;IP forwarding&lt;/a&gt; to &lt;a href=&quot;/index.php/Linux_enable_packet_forwarding&quot; title=&quot;Linux enable packet forwarding&quot;&gt;Linux enable packet forwarding&lt;/a&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:04, 6 March 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en-GB&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Pio2pio</name></author>
	</entry>
	<entry>
		<id>http://wiki.ciscolinux.co.uk/index.php?title=Linux_enable_packet_forwarding&amp;diff=1009&amp;oldid=prev</id>
		<title>Pio2pio: /* Using distribution specific init scripts */</title>
		<link rel="alternate" type="text/html" href="http://wiki.ciscolinux.co.uk/index.php?title=Linux_enable_packet_forwarding&amp;diff=1009&amp;oldid=prev"/>
		<updated>2014-02-23T15:28:08Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Using distribution specific init scripts&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:28, 23 February 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l36&quot;&gt;Line 36:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 36:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  FORWARD_IPV4=true&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  FORWARD_IPV4=true&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;and again restart the network service.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;and again restart the network service.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:linux]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Pio2pio</name></author>
	</entry>
	<entry>
		<id>http://wiki.ciscolinux.co.uk/index.php?title=Linux_enable_packet_forwarding&amp;diff=88&amp;oldid=prev</id>
		<title>Pio2pio: Created page with &quot;By default Linux distributions will have IP Forwarding disabled. This is normally a good idea, as most peoples will not need IP Forwarding, but if we are setting up a Linux ro...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.ciscolinux.co.uk/index.php?title=Linux_enable_packet_forwarding&amp;diff=88&amp;oldid=prev"/>
		<updated>2013-08-06T18:17:55Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;By default Linux distributions will have IP Forwarding disabled. This is normally a good idea, as most peoples will not need IP Forwarding, but if we are setting up a Linux ro...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;By default Linux distributions will have IP Forwarding disabled. This is normally a good idea, as most peoples will not need IP Forwarding, but if we are setting up a Linux router/gateway or maybe a VPN server (pptp or ipsec) or just a plain dial-in server then we will need to enable forwarding.&lt;br /&gt;
&lt;br /&gt;
====Check if IP Forwarding is enabled====&lt;br /&gt;
&lt;br /&gt;
Using '''sysctl''' query the '''sysctl kernel''' value '''net.ipv4.ip_forward''' to see if forwarding is enabled or not&lt;br /&gt;
 sysctl net.ipv4.ip_forward&lt;br /&gt;
 net.ipv4.ip_forward = 0&lt;br /&gt;
or checking out the value in the '''/proc''' system:&lt;br /&gt;
 cat /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
 0&lt;br /&gt;
In the both examples IP forwarding is disabled as show the '''value 0'''&lt;br /&gt;
====Enable IP Forwarding on the fly====&lt;br /&gt;
As with any sysctl kernel parameters we can change the value of '''net.ipv4.ip_forward''' on the fly without rebooting the system&lt;br /&gt;
 sysctl -w net.ipv4.ip_forward=1&lt;br /&gt;
or&lt;br /&gt;
 echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
the setting is changed instantly; the result will not be preserved after rebooting the system.&lt;br /&gt;
====Permanent setting using /etc/sysctl.conf====&lt;br /&gt;
To make this configuration permanent is using the file '''/etc/sysctl.conf''' where we add a line containing '''net.ipv4.ip_forward = 1'''&lt;br /&gt;
 /etc/sysctl.conf:&lt;br /&gt;
 net.ipv4.ip_forward = 1&lt;br /&gt;
if you already have an entry net.ipv4.ip_forward with the ''''value 0''' you can change that to '''1'''.&lt;br /&gt;
&lt;br /&gt;
To enable the changes made in '''sysctl.conf''' you will need to run the command:&lt;br /&gt;
 sysctl -p /etc/sysctl.conf&lt;br /&gt;
On '''RedHat''' based systems this is also enabled when restarting the network service:&lt;br /&gt;
 service network restart&lt;br /&gt;
and on '''Debian/Ubuntu''' systems this can be also done restarting the procps service:&lt;br /&gt;
 /etc/init.d/procps.sh restart&lt;br /&gt;
====Using distribution specific init scripts====&lt;br /&gt;
Although the methods presented above should work just fine and you would not need any other method of doing this, I just wanted to note that there are also other methods to enable IP Forwarding specific to some Linux distributions. For example '''Debian''' based distributions might use the setting:&lt;br /&gt;
 /etc/network/options:&lt;br /&gt;
 ip_forward=no&lt;br /&gt;
set it to '''yes''' and restart the network service. Also '''RedHat''' distributions might set this using:&lt;br /&gt;
 /etc/sysconfig/network:&lt;br /&gt;
 FORWARD_IPV4=true&lt;br /&gt;
and again restart the network service.&lt;/div&gt;</summary>
		<author><name>Pio2pio</name></author>
	</entry>
</feed>