Debian – Bonding interfaces

To install: apt-get install ifenslave   To configure dynamically ip link add name bond0 type bond mode 802.3ad ip link set dev enxe8ea6a402b82 name eth0 ip link set dev enxe8ea6a402cb7 name eth1 ip link set dev eth0 master bond0 ip link set dev eth1 master bond0 ip link set dev eth0 up ip link set […]

Read More →
SSH Magic

ssh -L <ipaddres>:<portnumber>:<ipaddress remote server>:<portnumber> localhost example 1 (ssh server + webserver) ssh -L 10.0.0.1:2200:10.0.0.2:443 10.0.0.1 enter you credentials on the ssh server 10.0.0.1 On a client in the browser address bar enter 10.0.0.1:2200 you should see the same if you enter 10.0.0.2:443 Now with two ssh servers and a webserver ssh -L 10.0.0.1:2200:10.0.0.2:443 10.0.0.3 […]

Read More →
Debian – Exclude interfaces from Network Manager

sudo vi /etc/NetworkManager/NetworkManager.conf [main] plugins=ifupdown,keyfile [ifupdown] managed=false [keyfile] # In case of one interfaces – Name # unmanaged-devices=interface-name:eth0 # In case of one interfaces – Names # unmanaged-devices=interface-name:eth0; interface-name:eth1 # In case of one interfaces – MAC # unmanaged-devices=mac:2c:3b:70:d6:d8:7f # In case of multiple interfaces – MAC’s # unmanaged-devices=mac:2c:3b:70:d6:d8:7f;mac:e8:ea:6a:40:2c:b7;mac:e8:ea:6a:40:2b:82  

Read More →
Debian – Vlan’s

To install:  sudo apt install vlan To load: sudo modprobe 8021q To check: lsmod | grep 8021 To configure: sudo ip link add link eth0 name eth0.23 type vlan id 23 sudo ip address add 192.168.1.1 dev eth0.23 sudo link set up eth0.23   To configure persistent: sudo ‘echo “8021q” >> /etc/modules’ sudo vi /etc/network/interfaces […]

Read More →
Bridge

To set up a bridge named br0 (part 1) apt install bridge-utils brctl addbr br0 brctl addif eth0 br0 brctl addif eth1 br0   To set up a bridge named br0 (part 2) ip link add br0 type bridge ip link set eth0 master br0′ ip link set eth1 master br0   To set up […]

Read More →
Wireshark/SSHdump

you have a remote ssh server with tcpdump or dumpcap installed. From a client which has ssh access to the remote server, you can run wireshark on the client and capture live traffic remote. In  case the user needs sudo to capture, wireshark will not prompt for the password. So you need to do the […]

Read More →
WPA-Enterprise lazyness

The following story is fiction. We have an IT security compagny with 1000 employees. In our office, we don’t have a big wired infrastructure, we have high density wifi. Security is based on WPA2-enterprise. To access wifi, internet, intranet, mail and office applications we use one single account…….. Be aware of the man with the […]

Read More →
Command Line connect wifi

In case of no encryption iw dev <device> connect <ssid> [<bssid>] Why bssid? In case you have multiple access points, you can specify a specific accesspoint. If you have just one, there’s no need to specify. i.e. iw dev wlan0 connect Freewifi 40:A5:EF:25:BF:12 In case of WPA/WPA2 apt-get install wpasupplicant wpa_passphrase <ssid> [passphrase] i.e. wpa_passphrase MyWifi Welcome123 Copy output to file wpa_supplicant […]

Read More →
Linux assign bogus MAC address

With linux we can change the MAC address of an interface via several methods: ifconfig <device> hw ether <mac address> ip link set <device> address <mac address> macchanger <device> <mac address> One disadvantage, we can only configure a unicast MAC address. It’s not possible to configure a non-unicast or bogus address. i.e. ifconfig eth0 hw […]

Read More →