Networking Forums

Networking Forums > Computer Networking > Linux Networking > IPsec wifi link in ad-hoc mode

Reply
Thread Tools Display Modes

IPsec wifi link in ad-hoc mode

 
 
Fabrice Delente
Guest
Posts: n/a

 
      09-25-2008, 05:51 PM
Hello.

I set up my two laptops to communicate in wifi ad-hoc mode.???

One of the laptops (192.168.1.3) acts as a router and a DNS server for the
other (192.168.1.4).

As I don't want anybody to use my router as a gateway, I must secure it.

I enabled a WEP encryption key between the two of them, but it's hardly
extremely secure.

So I set up an IPsec link between them; it works ok, but I don't know if
it's enough to guarantee that nobody can hijack my connection, using my
gateway to spam/spoof/etc.

How can I make sure that only 192.168.1.4 connects to 192.168.1.3? Must
I/can I do IP filtering? MAC addresses filtering?

If yes, how do I do that?

Thanks!

--
Fabrice DELENTE
 
Reply With Quote
 
 
 
 
Sven Vermeulen
Guest
Posts: n/a

 
      09-25-2008, 08:29 PM
On Thu, 25 Sep 2008 17:51:28 +0000, Fabrice Delente wrote:
> I set up my two laptops to communicate in wifi ad-hoc mode.???
>
> One of the laptops (192.168.1.3) acts as a router and a DNS server for
> the other (192.168.1.4).
>
> As I don't want anybody to use my router as a gateway, I must secure it.
>
> I enabled a WEP encryption key between the two of them, but it's hardly
> extremely secure.


Why not switch to TKIP/WPA or WPA2? As you're talking about laptops, this
should be doable (it wouldn't if you had an old AP that only supports
WEP).

> So I set up an IPsec link between them; it works ok, but I don't know if
> it's enough to guarantee that nobody can hijack my connection, using my
> gateway to spam/spoof/etc.


As long as the laptop acting as AP only accepts IPSec traffic (more
specifically, authenticated IPSec traffic) you should be quite safe.
However, wireless networks are still quite vulnerable to other types of
attacks (for instance, even with WEP/WPA/WPA2, one can still force
clients to disconnect even without prior knowledge of the keys).

> How can I make sure that only 192.168.1.4 connects to 192.168.1.3? Must
> I/can I do IP filtering? MAC addresses filtering?


IP filtering and MAC address filtering are just small bandages and are
easy to spoof.

Wkr,
Sven Vermeulen
 
Reply With Quote
 
Fabrice Delente
Guest
Posts: n/a

 
      09-26-2008, 05:54 AM
Sven Vermeulen <(E-Mail Removed)> wrote:
> Why not switch to TKIP/WPA or WPA2? As you're talking about laptops, this
> should be doable (it wouldn't if you had an old AP that only supports
> WEP).


I read things about wpa_supplicant but didn't get to understand if it's
possible to use in ad-hoc mode.

> As long as the laptop acting as AP only accepts IPSec traffic (more
> specifically, authenticated IPSec traffic) you should be quite safe.


None of the laptops is an AP. They are both in ad-hoc mode.

Thanks!

--
Fabrice DELENTE
 
Reply With Quote
 
Sven Vermeulen
Guest
Posts: n/a

 
      09-26-2008, 12:35 PM
On Fri, 26 Sep 2008 05:54:24 +0000, Fabrice Delente wrote:

> I read things about wpa_supplicant but didn't get to understand if it's
> possible to use in ad-hoc mode.


Apparently it isn't made for ad-hoc mode usage.

But your initial thoughts of using IPSec does provide a lot of security
already. You can also try to use VPN solutions such as OpenVPN (which
might be easier to manage than IPSec).

Wkr,
Sven Vermeulen
 
Reply With Quote
 
Fabrice Delente
Guest
Posts: n/a

 
      09-26-2008, 01:26 PM
Sven Vermeulen <(E-Mail Removed)> wrote:
> But your initial thoughts of using IPSec does provide a lot of security
> already. You can also try to use VPN solutions such as OpenVPN (which
> might be easier to manage than IPSec).


Setting up IPsec wasn't that hard; what I didn't understand is, if there is
an IPsec link between 192.168.1.3 (the router) and 192.168.1.4, can a
machine with IP 192.168.1.5 still connect to 192.168.1.3, and use its
routing facilities?

--
Fabrice DELENTE
 
Reply With Quote
 
Fabrice Delente
Guest
Posts: n/a

 
      09-26-2008, 05:39 PM
Maxwell Lol <(E-Mail Removed)> wrote:
> We built an ad hoc network a few years ago. I think we had to
> broadcast all packets to work around the issue.


I don't understand, could you explain what you mean?

--
Fabrice DELENTE
 
Reply With Quote
 
Fabrice Delente
Guest
Posts: n/a

 
      09-27-2008, 05:55 AM
Maxwell Lol <(E-Mail Removed)> wrote:
> Well, normally a packet is received by the client when it is addressed
> to the client. If you are A, and want to send a packet to B that will
> forward it to C, you can't simply put C's IP address as the
> destination. B will never see it as the address doesn't match.
>
>
> But by setting the broadcast bit at the MAC layer, B will receive the
> packet, and see that it should go to C.
>
> It's been 5 years. I'm a little fuzzy on the details.
>
> Or else B had to be put in promiscuous mode, so it received all
> packets. It was something like that...


Ok, thanks. However it's a technique I've never seen before, so I think I'll
stick to something simpler :^)

--
Fabrice DELENTE
 
Reply With Quote
 
Fabrice Delente
Guest
Posts: n/a

 
      09-27-2008, 03:35 PM
Sven Vermeulen <(E-Mail Removed)> wrote:
> But your initial thoughts of using IPSec does provide a lot of security
> already.


If I undertood correctly, it provides security on the
192.168.1.3<->192.168.1.4 link; that is, anybody wanting to talk to
192.168.1.4 that has IP 192.168.1.3 wont succeed unless he identifies
correctly through the IPsec layer, right?

If yes then my question is: is somebody connecting to 192.168.1.3 with IP
192.168.1.5 will be refused because he didn't use the IPsec link?

--
Fabrice DELENTE
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ipsec tunnel mode vs ip in ip with ipsec transport Reji Linux Networking 1 09-20-2011 04:29 PM
IPSec Policy Main Mode and Quick Mode aconti Windows Networking 0 02-25-2009 11:42 PM
IPSEC link in Ad-Hoc WIFI link very slow Fabrice Delente Linux Networking 2 11-10-2008 03:45 PM
IPv6 + IPsec + ipsec-tools 0.6.[4567] + scope:link = no SA established phil-news-nospam@ipal.net Linux Networking 0 07-25-2007 09:01 PM
IPSec transport mode or IPSec tunnel mode? Spin Windows Networking 1 07-01-2004 06:32 AM



1 2 3 4 5 6 7 8 9 10 11