Skip to content

Network Configuration

Configure network settings for optimal SSH connectivity. This guide covers local networks, remote access, and advanced networking scenarios.

Connect to devices on the same network:

Typical addresses:

192.168.1.x
192.168.0.x
10.0.0.x
172.16.x.x

Discovery methods:

  • mDNS/Bonjour: macbook.local
  • Static IP assignment
  • DHCP reservations
  • Network scanning

Connect over the internet:

Connection methods:

  • Public IP address
  • Domain name
  • Dynamic DNS
  • VPN tunnel

Security considerations:

  • Firewall configuration
  • Port forwarding
  • Fail2ban protection
  • Non-standard ports

Zero-configuration VPN for easy access:

Setup:

  1. Install on all devices
  2. Authenticate with same account
  3. Use Tailscale names in Kisuke
  4. Connect from anywhere

Benefits:

  • No port forwarding needed
  • Automatic NAT traversal
  • End-to-end encryption
  • Static device names

Get Tailscale →

Secure tunnel without opening ports:

Setup:

  1. Install cloudflared on server
  2. Create tunnel configuration
  3. Access via Cloudflare network
  4. No exposed ports

Benefits:

  • DDoS protection
  • No public IP needed
  • Access control
  • Analytics included

Use existing VPN infrastructure:

Common types:

  • OpenVPN
  • WireGuard
  • IPSec
  • Corporate VPN

Configuration:

  1. Connect to VPN first
  2. Use internal addresses
  3. Standard SSH connection
  4. Transparent to Kisuke

Default configuration:

  • Port 22
  • Well-known service
  • May be blocked on some networks
  • Target for automated attacks

Enhanced security through obscurity:

Common alternatives:

2222 - Alternative SSH
2022 - Easy to remember
8022 - High port
10022 - Five digits

Configuration:

/etc/ssh/sshd_config
Port 2222
# Restart SSH
sudo systemctl restart sshd

In Kisuke:

hostname:2222
192.168.1.100:2222

Access servers behind NAT:

Router configuration:

  1. Access router admin panel
  2. Find port forwarding section
  3. Forward external port to internal IP:22
  4. Save and apply

Example:

External: 2222 → Internal: 192.168.1.100:22

Allow SSH connections:

UFW (Ubuntu):

Terminal window
sudo ufw allow 22/tcp
sudo ufw allow from 192.168.1.0/24 to any port 22
sudo ufw enable

firewalld (Fedora):

Terminal window
sudo firewall-cmd --permanent --add-service=ssh
sudo firewall-cmd --permanent --add-port=2222/tcp
sudo firewall-cmd --reload

iptables:

Terminal window
sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT
sudo iptables-save

Ensure outbound SSH:

  • Corporate firewalls may block port 22
  • Try alternative ports (443, 8080)
  • Use VPN if restricted
  • Check with IT department

Improve reliability:

SSH client config:

~/.ssh/config
Host *
ServerAliveInterval 60
ServerAliveCountMax 3
TCPKeepAlive yes

Compression:

Terminal window
# Enable for slow connections
Host slowserver
Compression yes
CompressionLevel 6

Optimize for mobile:

Limit bandwidth:

Terminal window
# Reduce network usage
Host mobile
Compression yes
Ciphers aes128-ctr
MACs hmac-sha1

Connection multiplexing:

Terminal window
# Reuse connections
Host *
ControlMaster auto
ControlPath ~/.ssh/sockets/%r@%h:%p
ControlPersist 10m

Modern network support:

Server configuration:

/etc/ssh/sshd_config
AddressFamily any
ListenAddress ::

Kisuke connection:

[2001:db8::1]:22
ipv6.example.com

Support both protocols:

  • Prefer IPv6 when available
  • Fallback to IPv4
  • Automatic selection
  • Performance benefits

Connect through bastion:

SSH config:

Terminal window
Host production
HostName internal.server
ProxyJump bastion.example.com
User produser

In Kisuke:

  • Configure jump host as space
  • Set up target with ProxyCommand

Create SSH tunnel:

Setup tunnel:

Terminal window
ssh -D 8080 user@server

Use in Kisuke:

  • Configure proxy settings
  • Route traffic through tunnel
  • Access restricted resources

Multiple path redundancy:

  • Tailscale mesh
  • ZeroTier networks
  • WireGuard mesh
  • Automatic failover

Cannot reach host:

Terminal window
# Test connectivity
ping hostname
nslookup hostname
telnet hostname 22
nc -zv hostname 22

Connection timeout:

  • Check firewall rules
  • Verify port forwarding
  • Test from different network
  • Check ISP blocking

Slow connections:

  • Test bandwidth: speedtest-cli
  • Check latency: ping -c 10 hostname
  • Monitor packet loss
  • Try different ports

Intermittent drops:

  • Adjust keepalive settings
  • Check router stability
  • Monitor network logs
  • Consider wired connection

Protect SSH access:

  • Use non-standard ports
  • Implement fail2ban
  • Restrict source IPs
  • Monitor access logs

Limit connections:

/etc/ssh/sshd_config
AllowUsers john jane
AllowGroups sshusers
Match Address 192.168.1.0/24
PasswordAuthentication yes