Latest

Python Decision Making

Decision-making is the way where a program shift execution from one side to another based on a condition if the condition evaluates to True then the next statement(s) will be executed other wise if there is any else  statement its block(or body) will be executed instead.   True vs False vs not True All non 'None' values, not empty string, non-zero numbers, whitspace-only strings, and not False values are True False All None, empty string, False values are conside...

C Functions

All C programs has at least one function, which is main() ,  and all the most simple programs define more functions. A function is a group of statements that together perform a task. You can divide up your code into separate functions. How you divide up your code among different functions is up to you, but logically the division is such that each function performs a specific task. A function declaration tells the compiler about a function's name, return type, and parameters. A functi...

Debian Router - Dhcp Server Setup

We''ve learned  previously  how to set up unbound dns server as caching dns server for our LAN users, in this article we''ll configure dhcp server from which a unique ip address for each client assigned as a bonus automatically configure dns server settings for them.     In this debian router articles series also: Introduction . Hardware Requirements . Software installation . Basic Setup . /etc/network/Interfaces Configuration . Unboun...

Php Constants

PHP constants are  identifiers for a simple values. Unlike variables  a constant value cannot change during the execution of the script. Constants are case-sensitive by default. By convention, constant identifiers are always uppercase. A constant name starts with a letter or underscore, followed by any number of letters, numbers, or underscores. If you have defined a constant, it can never be changed or undefined. To define a constant you have to use define() function and to retri...

Debian Router - Unbound Dns Server Setup

In the previous article we''ve configured network interfaces, so by now debian box is connected to internet through WAN-AP on eth0 and to local network through LAN-AP on eth1. Today we''ll setup unbound dns server to serve dns queries for our awesome LAN clients.     In this debian router articles series also: Introduction . Hardware Requirements . Software installation . Basic Setup . /etc/network/Interfaces Configuration . Unbound dns server...

Go Structures

Go Structures are a user-defined data type available in Golang, which allows you to combine different values types (including structures) into one type, its similar to Classes in other object-oriented programming languages, Assume you want to keep track of the articles in a blog. You might want to track the following attributes of each article − Title Body Category Author Defining a Structure To define a structure, you must use type and struct statements. The struct statement ...

Iptables For Securing Webservers

Iptables and ip6tables used to build firewall on linux servers, in this article we'll go over some rules that could help securing your webserver by restricting internet traffic to your server, if you're looking for openbsd pf  then you may check  openbsd pf rules for webservers .     Whats iptables? Is a collection of tables which contains chains in which we define rules for incoming/outgoing traffic, each rule checked one by one within a certain chain till a matc...

Using Linux Debian As Router Setup

In this articles series you will learn how to setup Linux (Debian) as a Router for home/business local networks, to spice things I''ll show how to add dns server, proxy/web caching server, and basic web traffic filter to our cute debian box.   In this series I''ll go over: Introduction . Hardware Requirements . Software installation . Basic Setup . /etc/network/Interfaces Configuration . Unbound dns server setup . DHCP server setup . Squid setup. ...

Debian Router - Iptables And Sysctl.Conf Configuration

Tody we''ll finish configuring our awesome router, in the previous article we''d configured squid proxy, in this article we''ll pass all LAN traffic through squid using iptables.    In this debian router articles series also: Introduction . Hardware Requirements . Software installation . Basic Setup . /etc/network/Interfaces Configuration . Unbound dns server setup . DHCP server setup .  Squid setup .  Final step iptables a...

C Recursion

Recursion in programming is the process of calling a procedure repeatedly in a self-similar way, a recursive function or routine is a function that call itself repeatedly. void recursion() { recursion(); /* function calls itself */ } int main() { recursion(); } The C programming language supports recursion, i.e., a function to call itself. But while using recursion, programmers need to be careful to define an exit condition from the function, otherwise it will go into an...