Solved

firewall help with lan-to-lan vpn

Posted on 2014-03-11
5
291 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Do you have an old router lying around the house that you don’t know what to do with? Check the make and model, then refer to either of these links to see if its compatible. http://www.dd-wrt.com/site/support/router-database http://www.dd-wrt.c…
For a while, I have wanted to connect my HTC Incredible to my corporate network to take advantage of the phone's powerful capabilities. I searched online and came up with varied answers from "it won't work" to super complicated statements that I did…
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now