?
Solved

firewall help with lan-to-lan vpn

Posted on 2014-03-11
5
Medium Priority
?
302 Views
Last Modified: 2014-03-18
I have another open question related to this issue, but it's kind of got bogged down in the detail of the VPN so I've decided to abandon the question and try to be a little clearer in this one.

Here's the problem:

I have an ipsec tunnel set up and working between two sites, the configuration is nearly correct, but I'm unable to communicate through the tunnel from lan2 to lan1. It is almost certainly a misconfiguration or ommision in the firewall. Here are the details of the network:

LAN1 (left) is 192.168.4.0/24
LAN2 (right) is 192.168.3.0/24

I can successfully ping the router on the right from a host on the left
I can successfully ping a host on the right from a host on the left
I can successfully ping the router on the left from a host on the right
I cannot ping a host on the left from a host on the right.

This last one's where I'm struggling. I attempt to ping a host on the 192.168.4.0/24 LAN from the 192.168.3.0/24 LAN (the ONLY remaining thing that doesn't work) and I can see that my traffic reaches the router on the left (using tcpdump I can see the ICMP requests coming in) but the host on the right receives no reply.

Here's what I've put in my firewall.conf on the left-hand router so far (nb. all traffic across the tunnel uses interface ipsec0 or ipsec1, hence the firewall interface rule):

iptables -A forwarding_rule -i ipsec+ -s 192.168.3.0/24 -j ACCEPT
iptables -A forwarding_rule -o ipsec+ -d 192.168.3.0/24 -j ACCEPT

Open in new window


Very very simple, but it does allow almost all the traffic I want. Like I said when the router receives a ping from the right-hand lan it replies no trouble, but doesn't seem to want to relay that message to a host on its local network, OR maybe it isn't passing the local host's reply back across the ipsec interface.

I'm new to iptables, so any and all help is appreciated.
0
Comment
Question by:Joe_Pritchard
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 35

Expert Comment

by:Duncan Roe
ID: 39922740
forwarding_rule is not a built-in table (is not found in man iptables). Could you post your definition of that table please? Also a link to your old Q might help to give more background - you will have to accept a solution for that Q or deletion of it btw
0
 
LVL 2

Expert Comment

by:IMGIDC
ID: 39922956
what's the status of Outside/external interface access rules.

do you have incoming access-rule on each firewall like :

remote lan -- to --- local lan
0
 
LVL 1

Accepted Solution

by:
Joe_Pritchard earned 0 total points
ID: 39923074
Hi Folks

Apologies, I hadn't realised about the forwarding_rule table - that's something that openWRT sets up for you.

In any case, I've solved my issue basically through trial and error - I needed to add one more rule:

iptables -A zone_lan_forward -d 192.168.4.0/24 -j ACCEPT

Again I think zone_lan_forward is one of openWRT's. This solves the problem and traffic is flowing across the tunnel as nature intended.

Thanks for your attention anyway - should I accept my own post as the solution?
0
 
LVL 35

Expert Comment

by:Duncan Roe
ID: 39924888
That would be fine with me
0
 
LVL 1

Author Closing Comment

by:Joe_Pritchard
ID: 39936360
I solved my issue before anyone really commented with any suggestions, so I'm just closing it as I no longer have a problem...
0

Featured Post

Major Serverless Shift

Comparison of major players like AWS, Microsoft Azure, IBM Bluemix, and Google Cloud Platform

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you connect to your workplace's VPN, you may not notice that you are using your workplace's servers to serve up webpages.  This might be undesirable since the workplace can log all the places you've been.  It also might be very slow to load pag…
I've written this article to illustrate how we can implement a Dynamic Multipoint VPN (DMVPN) with both hub and spokes having a dynamically assigned non-broadcast multiple-access (NBMA) network IP (public IP). Here is the basic setup of DMVPN Pha…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Suggested Courses
Course of the Month8 days, 1 hour left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question