[Openswan Users] OpenWrt, inet: Unknown host

Marcus Carlson marcus at mejlamej.nu
Thu Mar 22 18:03:36 EDT 2007


Hi all,

I've been having some trouble with ipsec on one of my openwrt. I've got 
an identical setup that is working flawless, but this one I just can't 
get to work.

I don't know if this is the right place to ask, but I hope someone could 
point me in the right direction.

The setup:
OpenWrt Whiterussian with openswan 2.4.6 (installed with ipkg).
ipsec.conf:
conn mytunnel
         rightsubnet=192.168.100.0/24
         right=ip.of.ri.ght
         rightid="C=SE, ST=XX, O=XX, CN=XX, E=xx at xx.xx"
         auto=start
         authby=rsasig
         left=%defaultroute
         leftsubnet=192.168.30.0/24
         leftrsasigkey=%cert
         leftcert=mycert.crt
         rightrsasigkey=%cert
ipsec.secret:
: RSA bla.key

The errors:
When starting ipsec I get Unknown host from ipsec_setup, I've tried to 
found out the place where the code is run, but couldn't find it.

root at OpenWrt:~$ /etc/rc.d/init.d/ipsec restart
ipsec_setup: rmmod: ipsec: Success

ipsec_setup: Stopping Openswan IPsec...

ipsec_setup: Starting Openswan IPsec 2.4.6...

ipsec_setup: insmod: a module named ipsec already exists

ipsec_setup: ifconfig: inet: Unknown host

Also when trying to "up" the connection I get the following error:
root at OpenWrt:~$ ipsec auto --up mytunnel
022 "mytunnel": We cannot identify ourselves with either end of this 
connection.

--replace is no problem. Also tried setting leftnexthop with same error.

So, what could be the problem?

Thanks in advance,

Marcus


--------------------- More information ----------------

root at OpenWrt:~$ ifconfig
br0       Link encap:Ethernet  HWaddr 00:18:F8:3C:07:CA
           inet addr:192.168.30.1  Bcast:192.168.30.255  Mask:255.255.255.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
           TX packets:291 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0
           RX bytes:0 (0.0 B)  TX bytes:107218 (104.7 KiB)

eth0      Link encap:Ethernet  HWaddr 00:18:F8:3C:07:CA
           UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
           RX packets:7191 errors:0 dropped:0 overruns:0 frame:0
           TX packets:3578 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:777696 (759.4 KiB)  TX bytes:695457 (679.1 KiB)
           Interrupt:4

eth1      Link encap:Ethernet  HWaddr 00:18:F8:3C:07:CC
           UP BROADCAST RUNNING ALLMULTI MULTICAST  MTU:1500  Metric:1
           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
           Interrupt:2 Base address:0x5000

lo        Link encap:Local Loopback
           inet addr:127.0.0.1  Mask:255.0.0.0
           UP LOOPBACK RUNNING  MTU:16436  Metric:1
           RX packets:2212 errors:0 dropped:0 overruns:0 frame:0
           TX packets:2212 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0
           RX bytes:305951 (298.7 KiB)  TX bytes:305951 (298.7 KiB)

vlan0     Link encap:Ethernet  HWaddr 00:18:F8:3C:07:CA
           UP BROADCAST RUNNING ALLMULTI MULTICAST  MTU:1500  Metric:1
           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
           TX packets:291 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0
           RX bytes:0 (0.0 B)  TX bytes:108382 (105.8 KiB)

vlan1     Link encap:Ethernet  HWaddr 00:18:F8:3C:07:CB
           inet addr:XX.Y.ZZ.93  Bcast:XX.Y.ZZ.255  Mask:255.255.255.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:7185 errors:0 dropped:0 overruns:0 frame:0
           TX packets:3288 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:5
           RX bytes:648286 (633.0 KiB)  TX bytes:568044 (554.7 KiB)

root at OpenWrt:~$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use 
Iface
192.168.30.0    0.0.0.0         255.255.255.0   U     0      0        0 br0
XX.Y.ZZ.0       0.0.0.0         255.255.255.0   U     0      0        0 
vlan1
0.0.0.0         XX.Y.ZZ.254     0.0.0.0         UG    0      0        0 
vlan1

root at OpenWrt:~$ cat /etc/hosts
127.0.0.1 localhost OpenWrt


More information about the Users mailing list