DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying to migrate a "router" from Slackware to Debian.
And had a problem:
Want to configure the 2 interfaces to the internal network and make them "up" automatically.
Also has some simple iptables rules.
In Slack I created the "rc.local" with all the commands, simple and functional.
Now with Debian can't find the way just because it's not a "rc.d"...are rc0.d, rc1.d, rc2.d, rc3.d, ....etc. So, don't know in which one put the file.
How can I make the interfaces configure and go up automatically?
debian has a "rc.local" file in /etc/rc.local
also if you look in "/etc/network/interfaces" you can make interfaces start on boot using "auto"
Here's my /etc/network/interfaces file:
Quote:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0
# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
mapping hotplug
script grep
map eth1
iface eth0 inet static
address 192.168.0.2
netmask 255.255.255.0
broadcast 192.168.0.255
iface eth1 inet dhcp
auto eth0
auto eth1
the hotplug part is because my cable modem is connected by USB.
Hi, many thanks for the answer. Now can bring Up the eth1 with static IP address.
Problem now is to find a solution to make the other computers from the internal network, connected to this eth1, to receive an IP address and navigate.
do you want to use DHCP to assign IP addresses, DNS...? If so then you'll want the dhcp3-server package, you could also get gdhcpd which is a GUI to configure it.
As for the iptables rules, it depedns what you want to do with it, firewall, nat...?
After create a file in /etc/init.d/ called "rc.local, and linked to /etc/rc3.d/S90rc.local, where put the iptables rules...thing seems to be start to run.
No chance to do it editing the "examples" for /etc/network/interface and no idea where is for iptables here.
Anyway now have another problem: it's not giving ip addresses to the machines connected to the box (the router), even when run manually "dhcpd"
I thought was a good idea to switch to Debian because of its good package management and stability....but if have to change everything, or have to configure three different files for three respective actions, and in order to do that have to read three manuals or take a programming course....hmm...no way! instead as can be done simpler in Slackware or even OpenBSD I think is a nonsense!
Why is so complicated in Debian?
Why are not following the "logic" as other distros do?
Really don't know "why"....but in any case I know the result: another saying that Debian is for "hackers"....come on boys...make life easier for eveybody and will see that many others will move to this good distro!
If someone there has a "how to" for a Debian Router and want to share it....is wellcome.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.