Oberkategorie

Verwante Seiten

NAT

Mit den IPTables ein NAT anlegen.

Interfaces konfigurieren

Die Datei '/etc/network/interfaces'

# 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

# intern
auto eth0
iface eth0 inet static
address 192.168.4.1
netmask 255.255.255.0
broadcast 192.168.4.255
dns-domain vlan4
dns-nameserers 192.168.4.1

# extern
allow-hotplug eth1
iface eth1 inet static
address 192.168.0.40
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1
dns-domain routing
dns-nameservers 192.168.0.1

IPTables konfigurieren

# iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
# echo 1 > /proc/sys/net/ipv4/ip_forward
 
infos/linux/iptables/nat.txt · Zuletzt geändert: 2010/10/06 00:13 (Externe Bearbeitung)
 
Falls nicht anders bezeichnet, ist der Inhalt dieses Wikis unter der folgenden Lizenz veröffentlicht:CC Attribution-Noncommercial-No Derivative Works 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki