Tutorial How to Configure Router on Debian 9 Stretch

in #utopian-io7 years ago (edited)

Debian is an operating system that is opensource, and free, Debian is one of the distros of Linux, Debian has been through several times the release, from version 1,2,3,4,5,6,7,8 and the current version 9.
Debian 9 not only provides a free operating system but also provides more than 51000 packages that can run in Debian, ranging from office applications, education, and others.

1.jpg

In this tutorial I will explain how to create router server by first doing IP configuration on Debian 9, as we know many tutorials that have been circulating in the internet about router configuration in Debian 6, 7 and 8, but for Debian 9 tutorial is still little, because the configuration is different, the basic commands have changed a lot.
here is a little description of the terms used in a router
IP address is the address of a given computer in a computer network. the concept of IPaddress is almost the same as a mobile phone number, everyone has a hp number, and should not be the same from one to another. when the hp is connected to the ISP then automatically can connect to other hp, as well as the IP address on the computer, cannot be the same between computers to each other.
IP address is divided into 2 kinds;
Static IP is the IP address in the input manually, either the IP, network, or gateway, static IP is usually used to build a server.
IP DHCP is giving IP automatically to the client, DHCP is usually contained on server devices, modems, access points and others that can provide an IP address automatically to the client
The network topology that I will make is as follows

topologi.jpg

here is an IP configuration tutorial on Debian 9 to build a server
open the root terminal
check IP first
# ip a
ip address will appear on the existing network card, which must appear that is loopback, eth0 = ens32 and eth1 = ens35

2.jpg

continue with ip settings
# nano / etc / network / interfaces
will appear as follows
'# This file describes the network ...
'# and how to activitate them ...
source /etc/network/inerfaces.d/*
'# The loopback network interfaces
auto lo
iface lo inet loopback

'# The ens32 / eth0 network interfaces
auto ens32
iface ens32 inet static
address 192.168.137.4
netmask 255.255.255.0
gateway 192.168.201.1
dns-nameservers 8.8.8.8

'# The ens32 / eth0 network interfaces
auto ens35
iface ens35 inet static
address 192.200.100.1
netmask 255.255.255.0

save by pressing the combination key Ctrl + o enter, exit by Ctrl + x

22.jpg

check the IP address again, whether it has changed or not
# ip a
see the example in the following figure;

3.jpg

to be able to use internet access, we have to configure ip forward and resolv.conf file, here's how;
# nano /etc/sysctl.conf
uncheck # on line 28

4.jpg

# net.ipV4.ip_ip_forward = 1
be
net.ipV4.ip_ip_forward = 1
after that we configure resolv.conf file so that internet can run well
#nano /etc/resolv.conf
add in the box
nameserver 8.8.8.8

resolv.jpg

after the configuration is complete, restart networking by the way
# service networking restart
wait a few seconds, until normal again, then check the internet connection, can through the terminal can also directly use the web browser
if using the terminal do the test by the way
# ping google.com
if the connection is not stable yet do the process of restart / reboot the computer with the command
# reboot

finish.jpg

if the result is like a picture, then the IP configuration is complete, we just continue to configure DNS, DHCP, Proxy and others. hopefully this tutorial useful.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Wood kereeen

makasih kak ros

Nice post,...

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @raghib I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Suggestions

  • Contribute more often to get higher and higher rewards. I wish to see you often!
  • Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck!

Get Noticed!

  • Did you know project owners can manually vote with their own voting power or by voting power delegated to their projects? Ask the project owner to review your contributions!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Coin Marketplace

STEEM 0.20
TRX 0.13
JST 0.030
BTC 65236.35
ETH 3483.12
USDT 1.00
SBD 2.51