Skip to content

Instantly share code, notes, and snippets.

@vldmitrofanov
vldmitrofanov / setup_router.sh
Last active June 10, 2023 21:05
Setting up Raspberry Pi as WiFi adapter for non-wifi computer
#!/bin/bash
# Setting up raspberry as a WiFi access point
# make sure dnsmasq is already installed
echo 1 > /proc/sys/net/ipv4/ip_forward
ifconfig eth0 10.1.0.1 netmask 255.255.255.0
sudo ufw allow ssh
@vldmitrofanov
vldmitrofanov / get_ip.php
Created June 10, 2023 21:03
Logging up to a server your local IP obtained via DHCP
<?php
// On the server to get list of logged IPs
$content = file_get_contents("/tmp/ip.html");
echo $content;