Categories
Switch

Zyxel switch basic setup

Tested on GS2210

Setup DHCP

GS2210# configure 
GS2210(config)# vlan 1 
GS2210(config-vlan)# ip address default-management dhcp-bootp 
GS2210(config-vlan)# exit 
GS2210(config)# exit 
GS2210# write memory 

Setup static IP Address

GS2210# configure 
GS2210(config)# vlan 1 
GS2210(config-vlan)# ip address default-management 192.168.1.10 255.255.255.0
GS2210(config-vlan)# ip address default-gateway 192.168.1.1
GS2210(config-vlan)# exit 
GS2210(config)# exit 
GS2210# write memory 

Web Interface

From the above static IP Address setup, the web interface IP address is 192.168.1.10

URL: http://192.168.1.10

The default username and password Zyxel switch

Username: admin

Password: 1234

Basic Zyxel commands

GS2210# show version
GS2210# show ip
GS2210# show vlan 1
GS2210# show interfaces status
GS2210# show running-config page

Zyxel Configure VLAN command

GS2210# config
GS2210(config)# vlan 1 
GS2210(config-vlan)# name NAME
GS2210(config-vlan)# fixed 1
GS2210(config-vlan)# untagged 1
GS2210(config-vlan)# exit 
GS2210(config)# exit 
GS2210# write memory 

Zyxel Configure Interface command

GS2210# config
GS2210(config)# interface port-channel 1
GS2210(config-interface)# pvid 100
GS2210(config-interface)# exit 
GS2210(config)# exit 
GS2210# write memory 
Categories
Networking

Mac OS trunked VLAN Command line

VLAN Tagging in Terminal

ifconfig
sudo ifconfig vlan0 create
sudo ifconfig vlan0 vlan [VLAN-TAG] vlandev en0
sudo ipconfig set vlan0 DHCP

Note: [VLAN-TAG] = VLAN ID

Optional: Set static IP address

sudo ifconfig vlan0 inet 192.168.0.20 netmask 255.255.255.0

Set default gateway

sudo route add default 192.168.0.1

Delete vlan

sudo ifconfig vlan0 destroy
Categories
Web Server

Add correct host key in known_hosts

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
[...].
Please contact your system administrator.
Add correct host key in /home/root/.ssh/known_hosts to get rid of this message.
Offending RSA key in /home/root/.ssh/known_hosts:86
RSA host key for [...] has changed and you have requested strict checking.
Host key verification failed.

Fix

ssh-keyscan -t rsa [IP ADDRESS]
ssh-keyscan -t rsa 192.168.44.44

Example response,

# 192.168.44.44 SSH-2.0-OpenSSH_4.3
192.168.44.44 ssh-rsa AAAAB3NzaC1yc2EAAAGDSGAAAQEAwH5EXZG...

Add the entire line in known_hosts

# nano ~/.ssh/known_hosts
192.168.44.44 ssh-rsa AAAAB3NzaC1yc2EAAAGDSGAAAQEAwH5EXZG...
Categories
Networking

Opening a port on Mac

You could open a port by listening to the port

nc -l [PORT NUMBER]

Considering port is 500,

nc -l 500
Categories
Networking

Routing Basic Commands

sudo route add 192.168.1.0/24 [DEFAULT GATEWAY]
sudo route add 192.168.1.0/24 192.168.1.1

Debug Routing

netstat -nr

Mac

ifcoufig

Windows

ipconfig -all