No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Johannes Findeisen f0f2a9f373 added dhcpd configuration 6 months ago
LICENSE Initial commit 6 months ago
README.md Added config files; Many cleanups 6 months ago
dhcpd.conf added dhcpd configuration 6 months ago
dhcpd4@.service Initial commit of the concept 6 months ago
gateway.sh Added config files; Many cleanups 6 months ago
wpa_supplicant.conf Added config files; Many cleanups 6 months ago

README.md

gateway.sh

A small shell script to make your device a gateway for other devices

I had the situation that I needed a non wifi enabled device to connect to my home network but I had only a wireless network and no LAN available. Since I have an Ethernet port on my notebook I thought about making it a gateway for non WIFI devices.

So, here it is… ;)

Disable network management services

  • NetworkManager
  • dhcpcd
  • wpa_supplicant

wpa_supplicant

/etc/wpa_supplicant/wpa_supplicant.conf

network={
    ssid="NETWORK_NAME"
    psk="NETWORK_PASSWORD"
} 

systemd

If you want to start the DHCP daemon using systemd you need the following file. Make sure to edit gateway.sh to not start the DHCP daemon.

/etc/systemd/system/dhcpd4@.service

[Unit]
Description=IPv4 DHCP server on %I
Wants=network.target
After=network.target

[Service]
Type=forking
PIDFile=/run/dhcpd4.pid
ExecStart=/usr/bin/dhcpd -4 -q -pf /run/dhcpd4.pid %I
KillSignal=SIGINT

[Install]
WantedBy=multi-user.target