Archive

Articles taggués ‘routage’

Postrouting and IP Masquerading in Linux

16/04/2024 Aucun commentaire

postrouting masqueradingIPTables is responsible to handle packet filtering in Linux system. IPTables contains several predefined and/or user-defined tables. Each table contains chains and chain contain packet rules. IPTables uses NAT table to forward packets to another node.

What is POSTROUTING?

A Postrouting chain in NAT table means altering the IP packet after the routing is completed. Logically, a postrouting can be used to change the Source Address. As the routing is completed and destination has his own address, the only unknown address that can be masked is the Source. This is why postrouting is used for SNAT.

What is IP MASQUERADING?

Now, when a packet leaves the local network and tries to travel the public network, it will fail to traverse if it keeps using the local details. This is where IP Masquerading plays the role. IP Masquerading is masking the packet with identity of the external interface.

How POSTROUTING and MASQUERADING relates?

When a packet arrives to the local gateway that has external interface, masks the packet with IP Masquerading and send it through the public interface. That says, packet has to be routed first before mangling it for Masquerading. That is why, you need to apply the Masquerading target on the Postrouting chain of the NAT table.

How to setup Masquerading in Linux Firewall?

The following command will enable IP Masquerading in Linux Firewall:

$ iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

The above rule will use NAT table (-t nat) on built-in Postrouting Chain (-A POSTROUTING) on interface eth0 (-o eth0).

The target Masquerade (-j MASQUERADE) advises to mask the above matched IP packets from the related table to external interface of the system.

Thus the above, would allow the local networks to gain access to external network through IP Masquerading.

 

Source: Mellowhost

Munin: Monitoring the “unreachable” hosts

14/04/2024 Aucun commentaire

Source: munin-monitoring.org
There are a number of situations where you’d like to run munin-node on hosts not directly available to the Munin server. This article describes a few scenarios and different alternatives to set up monitoring. Monitoring hosts behind a non-routing server.

In this scenario, a *nix server sits between the Munin server and one or more Munin nodes. The server in-between reaches both the Munin server and the Munin node, but the Munin server does not reach the Munin node or vice versa.

To enable for Munin monitoring, there are several approaches, but mainly either using SSH tunneling or “bouncing” via the in-between server.

SSH tunneling

The illustration below shows the principle. By using SSH tunneling only one SSH connection is required, even if you need to reach several hosts on “the other side”. The Munin server listens to different ports on the localhost interface. A configuration example is included. Note that there is also a FAQ entry on using SSH that contains very useful information.

MuninSSHForwarding

Bouncing

This workaround uses netcat and inetd/xinetd to forward the queries from the Munin server. All incoming connections to defined ports are automatically forwarded to the Munin node using netcat.

MuninPortForwarding

 

Arethusa le test

09/03/2024 Comments off

Un nouveau test VPN publié par le blog du VPN. Ici les VPN sont testés , configurés par créer une base de données la plus fiable possible. Arethusa à ses adeptes, il a déjà été l’ objet d’ une publication par alipaxe. Comme toujours on essayera d’ insister sur les particularités: méthode de configuration – protocole rare – tutos techniques.

Arethusa est proposé par S6N.org: une organisation internationale à but non lucratif fondée en 2003, pour promouvoir liberté d’expression sur Internet. La juridiction dont dépend ce VPN est celle des îles Seychelles: « Applicable jurisdiction for the handling of personal data is the Republic of Seychelles. Only Seychelles authorities can ask us to reveal your personal details. The only details we have about you are the ones you entered yourself. » Le whois de S6N.org confirme l’ enregistrement de nom de domaine de  l’ organisation à Victoria, capitale de cette République. Bien que le site soit en Anglais, le support technique et l’ interface sont en français. Lire la suite…

Configurer une Freebox pour autoriser une connexion VPN à un routeur DD-WRT

23/02/2024 Comments off

Source: Autour de… Sam

Autour de… Sam
freebox-revolutionLa question revient assez souvent pour se connecter à distance chez soi au travers un VPN quand on dispose d’un routeur sous DD-Wrt derrière une box ADSL.
Dans le cas que vais expliquer ci-dessous, je prendrai le cas d’une Freebox V4 et d’une Freebox V6.

Il faut tout d’abord savoir que DD-Wrt embarque un très bon parefeu et que nos box ADSL françaises sont aussi équipées d’un parefeu quand elles sont en mode routeur et non pas en mode passerelle (gateway ou bridge). Lire la suite…

Categories: Réseau, Système Tags: ,

Using ssh as a SOCKS proxy on Mac OS X

20/02/2024 Comments off

Introduction

Many times it can be convenient to tunnel your web traffic through a proxy, particularly an encrypted one. This web page shows how to easily tunnel your traffic through an ssh-encrypted proxy on Mac OS X. This allows your traffic to traverse your local network without being visible to snoopers, even when visiting unencrypted sites.

It also allows you to appear to come from a different IP address, allowing you to defeat geolocation schemes. In particular, some credit card processors try to make sure that your credit card billing address is correlated with your IP address, which can be hard on us expatriates. Another example is the free credit report web site which doesn’t seem to work from outside the United States. There are undoubtedly many other practical, legitimate uses for this sort of redirection. Lire la suite…