<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[OpenVPN Site-2-Site not fully working]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I am desperete to get any advice on this. I am strugling with below problem for the last few days.<br />
I have a following test setup on my VMWARE which soon I need to implement to the production enviroment :</p>
<p dir="auto">Remote Lan BOX &lt;–------------------------------&gt; NET Cloud &lt;--------------------------------------&gt; PfsenseBOX ver. 1.2.2<br />
OpenBSD 4.4                                                                                                                              Host LAN GW<br />
vic0: 172.16.158.101 /24                                                                                            em0 172.30.2.30/24 WAN<br />
                                                                                                                              em1 172.30.102.0/24 LAN<br />
OpenVPN Logical scheme<br />
tun0: 172.30.200.6 ----&gt; 172.30.200.5 &lt;&lt;-------------LINKED-----------------&gt;&gt; 172.30.200.2 &lt;----- 172.30.200.1 tun0</p>
<p dir="auto">All firewall are currentyl setup to allow all traffic - I will harden it later. From NET Clout both boxes (real nics) are pingable.</p>
<p dir="auto">All connectivity is provided from Remote LAN Box to Host LAN and all hosts inside Host LAN (172.30.102.0/24) are reachable. However whenever I tried to ping (real address of any of the Remote LAN host - packets are not getting through).</p>
<p dir="auto">I read that this is more likely config bug with openvpn with dynamic routing tables. I am attaching config below - could someone point me in the right direction what its wrong?</p>
<p dir="auto">If there is anything else needed beside configs please give a shout.</p>
<p dir="auto">=== PFSense BOX ====</p>
<p dir="auto">Openvpn config</p>
<h1><a class="anchor-offset" name="cat-openvpn_server0.conf"></a>cat openvpn_server0.conf</h1>
<p dir="auto">writepid /var/run/openvpn_server0.pid<br />
#user nobody<br />
#group nobody<br />
daemon<br />
keepalive 10 60<br />
ping-timer-rem<br />
persist-tun<br />
persist-key<br />
dev tun<br />
proto tcp-server<br />
cipher BF-CBC<br />
up /etc/rc.filter_configure<br />
down /etc/rc.filter_configure<br />
server 172.30.200.0 255.255.255.0<br />
client-config-dir /var/etc/openvpn_csc<br />
push "route 172.30.102.0 255.255.255.0"<br />
lport 1199<br />
push "dhcp-option DOMAIN test.lan"<br />
push "dhcp-option DNS 172.30.102.114"<br />
push "dhcp-option WINS 172.30.102.114"<br />
ca /var/etc/openvpn_server0.ca<br />
cert /var/etc/openvpn_server0.cert<br />
key /var/etc/openvpn_server0.key<br />
dh /var/etc/openvpn_server0.dh<br />
persist-remote-ip<br />
float<br />
local 172.30.3.20<br />
route 172.16.158.0 255.255.255.0</p>
<p dir="auto">CCD folder options for remote clients (as authentication is made with Certificates)</p>
<h1><a class="anchor-offset" name="ls-lart-openvpn_csc"></a>ls -lart openvpn_csc/</h1>
<p dir="auto">total 6<br />
-rw-r--r--  1 root    nobody    35 Apr 29 11:53 sentry2<br />
drwxr-xr-x  2 nobody  nobody  512 Apr 29 11:53 .<br />
drwxr-xr-x  4 root    wheel  1024 Apr 29 11:57 ..</p>
<h1><a class="anchor-offset" name="cat-openvpn_csc-sentry2"></a>cat openvpn_csc/sentry2</h1>
<p dir="auto">iroute 172.16.158.0 255.255.255.0</p>
<p dir="auto">ROUTING TABLES after when OpenVPN sucessfully started</p>
<h1><a class="anchor-offset" name="netstat-nr-more"></a>netstat -nr |more</h1>
<p dir="auto">Routing tables</p>
<p dir="auto">Internet:<br />
Destination                Gateway            Flags    Refs      Use  Netif Expire<br />
default                      192.168.222.254    UGS        0    1679    em0<br />
127.0.0.1                  127.0.0.1              UH          0        0    lo0<br />
172.16.158.0/24        172.30.200.2        UGS        0        3  tun0<br />
172.30.3.0/24            link#2                  UC          0        0    em1<br />
172.30.3.128            00:19:b9:81:9a:ef  UHLW        1    4049    em1  1197<br />
172.30.3.140            00:19:b9:71:17:45  UHLW        1        0    em1  1142<br />
172.30.3.254            00:02:b3:9d:de:b6  UHLW        1    1090    em1  1090<br />
172.30.102.0/24        link#3                  UC          0        0    em2<br />
172.30.102.114          00:0c:29:78:82:a7  UHLW        1    1386    em2  1152<br />
172.30.103.0/24        link#4                    UC          0        0    em3<br />
172.30.103.1            00:50:56:c0:00:02  UHLW        1    1136    em3  1110<br />
172.30.200.0/24        172.30.200.2          UGS        0        0  tun0<br />
172.30.200.2            172.30.200.1          UH          2        0  tun0<br />
192.168.222.0/24      link#1                    UC          0        0    em0<br />
192.168.222.254        00:50:56:e0:7f:de  UHLW        2    1090    em0    924</p>
<p dir="auto">======== REMOTE LAN BOX (openBSD 4.4) Data After Successfully Connected via OpenVPN==================</p>
<p dir="auto">Config File</p>
<p dir="auto">float<br />
port 1199<br />
dev tun0<br />
nobind<br />
proto tcp-client</p>
<p dir="auto">remote 172.30.3.20 1199</p>
<p dir="auto">ping 10<br />
persist-tun<br />
persist-key<br />
tls-client<br />
ca /etc/openvpn/TNF_VPN_CA.crt<br />
cert /etc/openvpn/sentry.crt<br />
key /etc/openvpn/sentry.pem<br />
ns-cert-type server<br />
#comp-lzo<br />
pull<br />
verb 3</p>
<p dir="auto">ROUTING TABLES</p>
<p dir="auto">default              172.16.158.1                  UGS        1    1427    -    48 vic0<br />
loopback            localhost                        UGRS      0        0 33204    48 lo0<br />
localhost            localhost                        UH        1        0 33204    48 lo0<br />
172.16.158/24      link#1                            UC        2        0    -    48 vic0<br />
172.16.158.1        00:50:56:c0:00:08          UHLc      2      404    -    48 vic0<br />
sentry2              00:0c:29<img src="https://forum.netgate.com/assets/plugins/nodebb-plugin-emoji/emoji/android/1f18e.png?v=d0a5ddc94ac" class="not-responsive emoji emoji-android emoji--ab" style="height:23px;width:auto;vertical-align:middle" title=":ab:" alt="🆎" />89:7c          UHLc      0        2    -    48 lo0<br />
172.30.102/24      172.30.200.5                  UGS        0        6    -    48 tun0<br />
172.30.200.1        172.30.200.5                  UGHD      1      66    - L  48 tun0<br />
172.30.200.1/32    172.30.200.5                  UGS        1      101    -    48 tun0<br />
172.30.200.5      172.30.200.6                    UH        3        0    -    48 tun0<br />
BASE-ADDRESS.MCAST localhost                  URS        0        0 33204    48 lo0</p>
<p dir="auto">======== PINGS ===================<br />
Remote -&gt; Pfsense box real NIC 172.30.3.20<br />
Success</p>
<p dir="auto">Remote -&gt; Virtual Adapter of Remote Box 172.30.200.6<br />
Success</p>
<p dir="auto">Remote -&gt; Virtual Adapter of PfSense Box 172.30.200.1<br />
Success</p>
<p dir="auto">Remote -&gt; Any host NATted behind PFsense box 172.30.102.0/24<br />
Success</p>
<p dir="auto">PFsense -&gt; Remote BOX Real address  172.16.158.101<br />
Fails</p>
<p dir="auto">PFsense -&gt; Remote BOX Virtual OpenVPN  172.30.200.6<br />
Success</p>
<p dir="auto">PFSense -&gt; PFSense Virtual OpenVPN 172.30.200.1<br />
Fails</p>
<p dir="auto">port forwarding is turned on on REMOTE BOX<br />
bash-3.2# cat /etc/sysctl.conf |grep forward<br />
net.inet.ip.forwarding=1        # 1=Permit forwarding (routing) of IPv4 packets<br />
net.inet.ip.mforwarding=1      # 1=Permit forwarding (routing) of IPv4 multicast packets<br />
#net.inet6.ip6.forwarding=1    # 1=Permit forwarding (routing) of IPv6 packets<br />
#net.inet6.ip6.mforwarding=1    # 1=Permit forwarding (routing) of IPv6 multicast packets<br />
#net.inet6.ip6.accept_rtadv=1  # 1=Permit IPv6 autoconf (forwarding must be 0)</p>
<p dir="auto">NAT and PF Firewall Rules on REMOTE BOX to accept all traffic<br />
bash-3.2# pfctl -s rules<br />
pass out all flags S/SA keep state<br />
pass in all flags S/SA keep state<br />
pass in quick on tun0 all flags S/SA keep state<br />
pass out quick on tun0 all flags S/SA keep state<br />
bash-3.2# pfctl -sn<br />
nat on vic0 inet from ! (vic0) to any -&gt; 172.16.158.101</p>
<p dir="auto">Now I need to be able to reach any machine on the remote network. Could someone advise what need to be changed to actually get it solved.</p>
<p dir="auto">Thanks for all help in advance.</p>
]]></description><link>https://forum.netgate.com/topic/14975/openvpn-site-2-site-not-fully-working</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Apr 2026 22:29:31 GMT</lastBuildDate><atom:link href="https://forum.netgate.com/topic/14975.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 29 Apr 2009 12:47:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to OpenVPN Site-2-Site not fully working on Thu, 30 Apr 2009 07:40:24 GMT]]></title><description><![CDATA[<p dir="auto">Solved  :P</p>
<p dir="auto">I must be blind to not see it before. But maybe my blindeness may be helpful to someone with similar case:<br />
The directive 'iroute' (the one stored in common name file of client in) was not loaded by OpenVPN daemon.<br />
That's why routing was working until virtual adapter of remote box. OpenVPN simply did not know how to route to physical Adapter on remote LAN.</p>
<p dir="auto">The reason was that first letter of the common name (taken from cert) was uppercase - and the filename displayed was whole lower case.</p>
]]></description><link>https://forum.netgate.com/post/196209</link><guid isPermaLink="true">https://forum.netgate.com/post/196209</guid><dc:creator><![CDATA[xelor]]></dc:creator><pubDate>Thu, 30 Apr 2009 07:40:24 GMT</pubDate></item></channel></rss>