Netzwerkkonfig unter Debian/Kali über Interfaces: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(→Nat) |
|||
| Zeile 36: | Zeile 36: | ||
net.ipv4.ip_forward = 1 | net.ipv4.ip_forward = 1 | ||
*sysctl -p | *sysctl -p | ||
| − | |||
| − | |||
Version vom 13. Oktober 2020, 08:02 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 # post-up iptables -t nat -A POSTROUTING -s 192.168.66.0/24 -j SNAT -o eth0 --to-source 172.10.20.1 pre-up iptables -t nat -D POSTROUTING -s 192.168.66.0/24 -j SNAT -o eth0 --to-source 172.10.20.1 auto eth1 iface eth1 inet static address 192.168.66.51 netmask 255.255.255.0
Hoch und Runterfahren der Schnittstellen
- ifup -va
- ifdown -va
Nameserver
- /etc/resolv.conf
search U26
nameserver 172.10.1.1
Forwarding
- /etc/systctl.conf
net.ipv4.ip_forward = 1
- sysctl -p