IPSec tunneling problem



Hello!

We have a central office which is separated from the Internet with firewall running Linux 2.4 and FreeSWAN. I'm trying to create an IPSec tunnel to the central office from another small branch office, using FreeBSD 6.2 with it's integrated IPSec and ipsec-tools. The tunneling is generally working, both internal networks can see each other, but I'm having some problems with traffic originating from the FreeBSD firewall itself.

The central office has internal network 192.168.1.0/24 and firewall's external IP is, let's say, A.B.C.D. The branch office has internal network 192.168.5.0/24 and firewall's external IP is W.X.Y.Z.

The policies in /etc/ipsec.conf are as follows.

spdadd 192.168.5.0/24 192.168.1.0/24 any -P out ipsec \
esp/tunnel/W.X.Y.Z-A.B.C.D/require;
spdadd 192.168.1.0/24 192.168.5.0/24 any -P in ipsec \
esp/tunnel/A.B.C.D-W.X.Y.Z/require;

The traffic between hosts in 192.168.1.0/24 and 192.168.5.0/24 is being correctly tunnelled, i.e. when I watch the traffic on firewall's external interface with tcpdump, I can see only ESP traffic between A.B.C.D and W.X.Y.Z, and the internal IPs don't appear anywhere.

I can even successfully initiate *some* tunnelled traffic from the firewall machine itself, for example
ping -S 192.168.5.1 192.168.1.3
works correctly, as does
telnet -s 192.168.5.1 192.168.1.3 53

However, the main reason why I want to have internal traffic originating from the firewall host itself is that I'd like to run an internal DNS server with slave zones for my internal network (*.in-addr.arpa) so all the DNS traffic wouldn't go through the VPN. The master for these zones is 192.168.1.3. I've configured named.conf with following

options
{
...
listen-on { 127.0.0.1; 192.168.5.1; };
query source address 192.168.5.1;
forwarders {
192.168.1.3;
};
...
};
...

zone "1.168.192.in-addr.arpa" {
type slave;
file "slave/1.168.192.in-addr.arpa";
masters { 192.168.1.3; };
};
...

However, when I start named and watch the traffic on firewall's external interface with tcpdump, I can see actual packets between 192.168.5.1 and 192.168.1.3.

What is the difference between this DNS traffic and things like telnet -s, which causes the DNS traffic to not be tunneled?

--
Toomas Aas
_______________________________________________
freebsd-net@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: attack alert on port 1080
    ... the firewall access to the Internet through a single IP address. ... it should only tunnel inside traffic out towards the Internet. ... masking their attacks as if they were coming from you. ... Windows personal firewall, ...
    (RedHat)
  • RE: [fw-wiz] L2L VPN redundancy for T1 link
    ... 'merger several Internet T1s to get the bandwidth desired and to do BGP ... The GRE tunnel passes the internal routing information between site ... A & B. Because the GRE Tunnel is passing thru the VPN Tunnel the firewall ...
    (Firewall-Wizards)
  • Re: telnet replacement - not ssh?
    ... telnet in combination with kerberos, s/key or srp ought to do as you ask. ... since part of the traffic is via the internet an unencrypted transport ... connect to it via ssh from outside via the firewall but nothing but telnet ... telnet from the tunnel terminus, so if work needs to be done on the ...
    (comp.security.misc)
  • Re: PPTP and NAT
    ... There is no relationship between what happens "outside" the Tunnel vs what ... Server at the other end,...it does not "see" either Firewall or the Internet ... Internet can not "see" what is inside the Tunnel nor act upon it. ... Can this protocol cope with this> scenario? ...
    (microsoft.public.windows.server.networking)
  • Re: avast
    ... > Just did a clean installation of xp pro sp1 and download 'avast anti ... Did you firewall before connecting to the internet? ... Internet and patch with the critical updates? ... Why you should use a computer firewall.. ...
    (microsoft.public.windowsxp.general)