<?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 Problem - Linux as VPN and Internet gateway in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/problem-linux-as-vpn-and-internet-gateway/m-p/4773003#M81275</link>
    <description>Hi dear memebers.&lt;BR /&gt;&lt;BR /&gt;I just set up a linux server which is acting as an internet gateway. For specific reason clients first make a vpn connection trough the internet to the linux server. &lt;BR /&gt;On the linux server iptables is configured for NAT.&lt;BR /&gt;The problem is that the internet speed becomes slower than expected. &lt;BR /&gt;I used windows and RAAS and the speed was realy good.&lt;BR /&gt;The server has only 1 NIC(eth0) and an alias interface is added to eth0. the alias is eth:0 with ip address 192.168.0.253&lt;BR /&gt; iptables config is as follows:&lt;BR /&gt;&lt;BR /&gt;iptables -P INPUT ACCEPT&lt;BR /&gt;iptables -F INPUT&lt;BR /&gt;iptables -P OUTPUT ACCEPT&lt;BR /&gt;iptables -F OUTPUT&lt;BR /&gt;iptables -P FORWARD DROP&lt;BR /&gt;iptables -F FORWARD&lt;BR /&gt;iptables -t nat -F&lt;BR /&gt;&lt;BR /&gt;iptables -A FORWARD -d 192.168.0.0/24 -m state --state ESTABLISHED,RELATED -j ACCEPT&lt;BR /&gt;iptables -A FORWARD -s 192.168.0.0/24 -j ACCEPT&lt;BR /&gt;iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j SNAT --to MY_VALID_IP&lt;BR /&gt;&lt;BR /&gt;Please Help.&lt;BR /&gt;</description>
    <pubDate>Sat, 02 Apr 2011 03:26:33 GMT</pubDate>
    <dc:creator>hamidr</dc:creator>
    <dc:date>2011-04-02T03:26:33Z</dc:date>
    <item>
      <title>Problem - Linux as VPN and Internet gateway</title>
      <link>https://community.hpe.com/t5/operating-system-linux/problem-linux-as-vpn-and-internet-gateway/m-p/4773003#M81275</link>
      <description>Hi dear memebers.&lt;BR /&gt;&lt;BR /&gt;I just set up a linux server which is acting as an internet gateway. For specific reason clients first make a vpn connection trough the internet to the linux server. &lt;BR /&gt;On the linux server iptables is configured for NAT.&lt;BR /&gt;The problem is that the internet speed becomes slower than expected. &lt;BR /&gt;I used windows and RAAS and the speed was realy good.&lt;BR /&gt;The server has only 1 NIC(eth0) and an alias interface is added to eth0. the alias is eth:0 with ip address 192.168.0.253&lt;BR /&gt; iptables config is as follows:&lt;BR /&gt;&lt;BR /&gt;iptables -P INPUT ACCEPT&lt;BR /&gt;iptables -F INPUT&lt;BR /&gt;iptables -P OUTPUT ACCEPT&lt;BR /&gt;iptables -F OUTPUT&lt;BR /&gt;iptables -P FORWARD DROP&lt;BR /&gt;iptables -F FORWARD&lt;BR /&gt;iptables -t nat -F&lt;BR /&gt;&lt;BR /&gt;iptables -A FORWARD -d 192.168.0.0/24 -m state --state ESTABLISHED,RELATED -j ACCEPT&lt;BR /&gt;iptables -A FORWARD -s 192.168.0.0/24 -j ACCEPT&lt;BR /&gt;iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j SNAT --to MY_VALID_IP&lt;BR /&gt;&lt;BR /&gt;Please Help.&lt;BR /&gt;</description>
      <pubDate>Sat, 02 Apr 2011 03:26:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/problem-linux-as-vpn-and-internet-gateway/m-p/4773003#M81275</guid>
      <dc:creator>hamidr</dc:creator>
      <dc:date>2011-04-02T03:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Problem - Linux as VPN and Internet gateway</title>
      <link>https://community.hpe.com/t5/operating-system-linux/problem-linux-as-vpn-and-internet-gateway/m-p/4773004#M81276</link>
      <description>Have you tested the speed of the VPN when the NAT is disabled, and vice versa?&lt;BR /&gt;&lt;BR /&gt;&amp;gt; iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j SNAT --to MY_VALID_IP&lt;BR /&gt;&lt;BR /&gt;This looks slightly wrong: it applies SNAT to all outgoing traffic with 192.168.0.* source addresses. Even traffic that is going *to* the 192.168.0.* network will get SNATted, which probably isn't exactly what you wanted.&lt;BR /&gt;&lt;BR /&gt;Try this line instead:&lt;BR /&gt;&lt;BR /&gt;iptables -t nat -A POSTROUTING -s 192.168.0.0/24 \! -d 192.168.0.0/24 -j SNAT --to MY_VALID_IP&lt;BR /&gt;&lt;BR /&gt;SNAT should be applied to Internet traffic only, not to traffic that is going to your internal network. This line should SNAT everything that has source address within 192.168.0.*, and destination address NOT within 192.168.0.*.&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Mon, 04 Apr 2011 04:16:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/problem-linux-as-vpn-and-internet-gateway/m-p/4773004#M81276</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2011-04-04T04:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem - Linux as VPN and Internet gateway</title>
      <link>https://community.hpe.com/t5/operating-system-linux/problem-linux-as-vpn-and-internet-gateway/m-p/4773005#M81277</link>
      <description>Thank you dear Matti but the problem still persists. I just found that even when I run an apache server and simply download a file from my server, I will get a maximum of 10KB/s. The server has 100 Mb/s of internet connectivity and my internet sepeed is about 2 Mb/s. Please help me.</description>
      <pubDate>Mon, 04 Apr 2011 08:26:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/problem-linux-as-vpn-and-internet-gateway/m-p/4773005#M81277</guid>
      <dc:creator>hamidr</dc:creator>
      <dc:date>2011-04-04T08:26:22Z</dc:date>
    </item>
  </channel>
</rss>

