cancel
Showing results for 
Search instead for 
Did you mean: 

DHCP Servers.

seanbranagh
Grafter
Posts: 1,236
Registered: ‎02-08-2007

Re: DHCP Servers.

I have now got this working perfectly by creating a bridge at startup. I removed the IP addresses from both eth0 and eth1.
I then added bridge br0 at startup using the two interfaces and assigned the ip address that I have always used for the server.
In /etc/rc.local:
brctl addbr br0
brctl addif br0 eth0
brctl addif br0 eth1
ip link set br0 up
ip addr add 192.168.10.39/24 brd + dev br0
route add default gw 192.168.10.31 dev br0
I then blocked UDP 67-68 in both directions on br0 using iptables and that was it.
To test this I done the following. I disabled the dhcp server in my router and tried to obtain an ip on my laptop in my house. With iptables switched off on the server I received an asigned ip from my friends router but with ip tables switched on I was unable to obtain an ip from his router. I then done the same thing at the opposite end and got the same result. All other aspects of the server and the network work exactly as they did before.
chillypenguin
Grafter
Posts: 4,729
Registered: ‎04-04-2007

Re: DHCP Servers.

Thanks for the update, it is always great to hear that a suggestion works.
I did have a try myself, but did not have the time to get it working. I will give it a try with your instructions, it looks like I had missed a few important steps.