Solved

firewall help with lan-to-lan vpn

Posted on 2014-03-11
5
294 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
  • 2
  • 2
5 Comments
 
LVL 34

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 34

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Sophos UTM Endpoint VPN 2 61
what kind of tasks do I need to conduct in order to configure ip-sec in AWS 1 38
VPN issue 2 58
Review of a VPN cert policy 4 28
Sometimes, you want your microsoft VPN to route all the traffic to the remote network. Usually your employer network. This makes it possible to access all the nodes inside this remote LAN, even if they have no "public DNS" entries. To do so, you wo…
I recently attended Cisco Live! in Las Vegas, a conference that boasted over 28,000 techies in attendance, and a week of hands-on learning hosted by a solid partner with which Concerto goes to market.  Every year, Cisco displays cutting-edge technol…
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…
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…

773 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