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 →
Cisco Catalyst 3850 sniffer 802.1x

The accesspoints and wireless management interface should have a routable ip address In priv mode on the Cisco catalyst 3850 AP name <name> mode sniffer AP name <name> sniff <dot11a/dot11b> <channel> <ip address sniffer> On the sniffer you can decode traffic from wireless management interface as peekremote  

Read More →
Apache as proxy-server

Enable modules: sudo a2enmod proxy proxy_http proxy_connect open file ../mods-enabled/proxy.conf uncomment #ProxyRequests On create file ../sites-available/forward_proxy.conf <VirtualHost *:8080> ProxyRequests On ProxyVia On <Proxy “*”> Require ip 192.168 Require ip 127.0.0.1 Require ip 10 </Proxy> ErrorLog ${APACHE_LOG_DIR}/error_forward_proxy.log CustomLog ${APACHE_LOG_DIR}/access_forward_proxy.log combined </VirtualHost> open file ../ports.conf and add the following Listen 0.0.0.0:80 Listen 0.0.0.0:8080 sudo a2ensite forward-proxy.conf service […]

Read More →