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
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.