Netzwerkkonfig unter Debian/Kali über Interfaces
Zur Navigation springen
Zur Suche springen
Temporäres änderen der IP
- ip address add 172.10.1.179/26 dev eth0
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 # Nat wenn Schnittstelle hochgefahren wird post-up iptables -t nat -A POSTROUTING -s 192.168.66.0/24 -j SNAT -o eth0 --to-source 172.10.20.1 pre-down 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