[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dhcp_spoof and default gateway



Hi :)

I'm having a small routing problem under OpenBSD.
I'm using an Adsl modem/router to connect to  the internet. To avoid using ppp 
on OpenBSD as well as not using the router built-in NAT and all (so I can use 
PF), I configured the modem for dhcp_spoof. This is a mode were when the 
modem connects to the ISP, the wan adress is passed to the pluged-in computer 
after issuing a dhcp request.
I do not have any problem using this mode under Windows and Linux (I tried 
both to make sure it was working fine) but under OpenBSD it does not work.
Note that I have a fixed IP, so I don't even need to issue a dhcp request to 
the modem (this also works under Windows and Linux).

After searching for a while, I think I found where the problem lies: the 
default gateway is not on the same subnet (which does not seem to be a 
problem for the other OSes).
Here's an exemple configuration:
@ip: 80.1.2.3
netmask: 255.255.255.255
default GW: 193.1.2.3

What I did to configure the interface and add the default gateway was:
ifconfig rl0 inet 80.1.2.3 netmask 255.255.255.255
route add -host 193.1.2.3 80.1.2.3
# I also tried route add 193.1.2.3 -interface 80.1.2.3
# I tried to play with -genmask too without success
route add default 193.1.2.3

But is is still not going out ! I can't even ping 193.1.2.3. Note that in 
Linux, I used the exact same commands (though the syntax varies a big) and it 
works.
I was wondering if you guys had any idea about how to fix this configuration 
issue.
Just for info, here is a shorten output from Linux routing table:
193.1.2.3   80.1.2.3   255.255.255.255 UGH eth0
0.0.0.0        193.1.2.3 0.0.0.0                   UG    eth0

I apologize if this is not very understandable, it is quite complicated to 
explain in English which is not my birth language.
Thanks in advance.

Regards,

Antoine



Visit your host, monkey.org