Debian as router/gateway/dhcp
Hello,
I am using router with the config of my debian. I have a station that should serve as a router / firewall for my LAN. and to the Internet. So I installed the base debian with kernel 2.4.20. and dhcp. I want to know about Debian as router/gateway/dhcp. I try to configure or reconfigure my internet connection (WiFi) but not succeeding. So thought that you guys might be helpful .!! :whistling
Re: Debian as router/gateway/dhcp
If you have a debian or ubuntu yes. Gateway indeed corresponds to the bridge. For more info type :
wireless man
You can have a wireless ethernet interface eth0 and wlan0 both described in that file. Make sure that those are the names of your interfaces by typing in a console :
/ Sbin / ifconfig
Re: Debian as router/gateway/dhcp
If you choose this arrangement, the computer server will absolutely be on for pc1 and pc2 can go on the net. You can do this kind of configuration :
I put pc1 and pc2 in two different subnets like that if one day you want to put a switch between your server and pc1 (or pc2) you can do it directly.
- pc1: 192.168.1.1 default route
- pc2: 192.168.2.1 default route
Server :
Assuming that the numbering of interfaces eth follow what I put on my diagram:
/ Sbin / route add-net 192.168.1.0 netmask 255.255.255.0 dev eth1 / sbin / route add-net 192.168.2.0 netmask 255.255.255.0 dev eth2 / sbin / route add default gw 192.168.0.1 dev eth0 .
After that he can no doubt you'll have to make a network bridge.
Re: Debian as router/gateway/dhcp
You will have to do the following things initially :
- installation of cards
- / sbin / route
- make a bridge.
Debian is already installed on the server, with a map eth0
IP address 192.168.0.3
mask 255.255.255.0
Gateway: 192.168.0.254
DNS: 212.27.32.176 212.27.32.177
Re: Debian as router/gateway/dhcp
It should crossover cables between two pcs, and a straight cable between your server and your freebox. The recent uncross switches which avoids having to ask the question, but it is a priori not the case with ethernet cards. For what is seen as the public ip freebox your router is supposed to do, there's just that it has a public ip (interface with the socket ADSL). Your server and the interface of the server side freebox have a local IP.
Re: Debian as router/gateway/dhcp
In general way you want to do a NAT router and it works very well in Linux. To avoid that you get lost in irrelevant details (for example, question number between 192.168.0.3 and 192.168.0.1 it works with both if you are coherent overall) following the general principle :
Router => two network cards:
A public IP for Internet
A private IP network, eg 192.168.1.1, mask = 255.255.255.0
Any client PC: IP = 192.168.1.x with x = 2,3,4,5 ,.... mask = 255.255.255.0 and Gateway = 192.168.1.1 (private IP = router-PC).