Netzwerkkonfig unter Debian/Kali über Interfaces: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
Zeile 28: Zeile 28:
 
  net.ipv4.ip_forward = 1
 
  net.ipv4.ip_forward = 1
 
*sysctl -p
 
*sysctl -p
 +
=Nat=
 +
*iptables -t nat -A POSTROUTING -s 192.168.66.0/24 -j SNAT --to-source 172.10.20.1

Version vom 13. Oktober 2020, 07:46 Uhr

Konfigdatei

  • /etc/network/interfaces
source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
 address 172.10.20.1
 netmask 255.255.0.0
 gateway 172.10.1.1

auto eth1
iface eth1 inet static
 address 192.168.56.51
 netmask 255.255.255.0

Nameserver

  • /etc/resolv.conf

search U26

nameserver 172.10.1.1

Forwarding

  • /etc/systctl.conf
net.ipv4.ip_forward = 1
  • sysctl -p

Nat

  • iptables -t nat -A POSTROUTING -s 192.168.66.0/24 -j SNAT --to-source 172.10.20.1