<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Configuring VPN client</title>
	<atom:link href="http://www.redips.net/linux/configuring-vpn-client/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.redips.net/linux/configuring-vpn-client/</link>
	<description>Techniques and Web Technologies</description>
	<lastBuildDate>Fri, 12 Mar 2010 08:51:54 +0100</lastBuildDate>
	
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: dbunic</title>
		<link>http://www.redips.net/linux/configuring-vpn-client/comment-page-1/#comment-128</link>
		<dc:creator>dbunic</dc:creator>
		<pubDate>Tue, 24 Feb 2009 10:31:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.redips.net/?p=31#comment-128</guid>
		<description>Konstantin,
I&#039;m not a network expert, but I have experience with Linux Wireless Gateway on my local network. This is somehow similar to your environment and I will try to give you some hints. Lets assume that you have fixed public IP address and you want to set one Linux box as gateway. Gateways usually have more than one network devices. In my case, I had wireless and network card, and in your case you will have at least two network cards. First network (eth0) device should be configured for your local network (for example set IP 10.0.0.1 and define range 10.0.0.0/24), while second network device (eth1) should have public IP - something like 1.2.3.4

OK, now it&#039;s time to enable IP forwarding on the gateway box. To do this, add the following line to the file &lt;em&gt;/etc/sysctl.conf&lt;/em&gt;:
&lt;strong&gt;net.ipv4.ip_forward = 1&lt;/strong&gt;

You will have to reboot Linux because this ensures IP forwarding starts every time you reboot the machine. To start it without rebooting, type the following command:
&lt;strong&gt;echo 1 &gt; /proc/sys/net/ipv4/ip_forward&lt;/strong&gt;

Next, enable Source Network Address Translation (SNAT) so that your local network can use the Internet transparently.
&lt;strong&gt;iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to 1.2.3.4&lt;/strong&gt;


Now your clients will have an open road to the Internet ;) just set their default gateway to the 10.0.0.1

I will strongly advice you to set a firewall on gateway to protect a your local network. Please see how I described firewall for the Web server &lt;a title=&quot;Firewall for the Web server&quot; href=&quot;http://www.redips.net/linux/lamp-setup/#section7&quot; rel=&quot;nofollow&quot;&gt;LAMP setup: Beginning &#124; Firewall&lt;/a&gt; ... You can delete lines with ports 80 and 22 and below line:
&lt;strong&gt;-A INPUT -i lo -j ACCEPT&lt;/strong&gt;
add a line to accept all traffic from the local network:
&lt;strong&gt;-A INPUT -i eth0 -j ACCEPT&lt;/strong&gt;

Hope this comment will give useful informations ...</description>
		<content:encoded><![CDATA[<p>Konstantin,<br />
I'm not a network expert, but I have experience with Linux Wireless Gateway on my local network. This is somehow similar to your environment and I will try to give you some hints. Lets assume that you have fixed public IP address and you want to set one Linux box as gateway. Gateways usually have more than one network devices. In my case, I had wireless and network card, and in your case you will have at least two network cards. First network (eth0) device should be configured for your local network (for example set IP 10.0.0.1 and define range 10.0.0.0/24), while second network device (eth1) should have public IP - something like 1.2.3.4</p>
<p>OK, now it's time to enable IP forwarding on the gateway box. To do this, add the following line to the file <em>/etc/sysctl.conf</em>:<br />
<strong>net.ipv4.ip_forward = 1</strong></p>
<p>You will have to reboot Linux because this ensures IP forwarding starts every time you reboot the machine. To start it without rebooting, type the following command:<br />
<strong>echo 1 > /proc/sys/net/ipv4/ip_forward</strong></p>
<p>Next, enable Source Network Address Translation (SNAT) so that your local network can use the Internet transparently.<br />
<strong>iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to 1.2.3.4</strong></p>
<p>Now your clients will have an open road to the Internet <img src='http://www.redips.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  just set their default gateway to the 10.0.0.1</p>
<p>I will strongly advice you to set a firewall on gateway to protect a your local network. Please see how I described firewall for the Web server <a title="Firewall for the Web server" href="http://www.redips.net/linux/lamp-setup/#section7" rel="nofollow">LAMP setup: Beginning | Firewall</a> ... You can delete lines with ports 80 and 22 and below line:<br />
<strong>-A INPUT -i lo -j ACCEPT</strong><br />
add a line to accept all traffic from the local network:<br />
<strong>-A INPUT -i eth0 -j ACCEPT</strong></p>
<p>Hope this comment will give useful informations ...</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Konstantin</title>
		<link>http://www.redips.net/linux/configuring-vpn-client/comment-page-1/#comment-127</link>
		<dc:creator>Konstantin</dc:creator>
		<pubDate>Mon, 23 Feb 2009 18:31:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.redips.net/?p=31#comment-127</guid>
		<description>Hi. Thank you for instructions. Can you help me? How can I make NAT (or MASQUERADE) other VPN. I have local net and only one IP address?</description>
		<content:encoded><![CDATA[<p>Hi. Thank you for instructions. Can you help me? How can I make NAT (or MASQUERADE) other VPN. I have local net and only one IP address?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
