<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.campisano.org/wiki/Debian_based_home_wifi_router/history?feed=atom</id>
	<title>Debian based home wifi router - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.campisano.org/wiki/Debian_based_home_wifi_router/history?feed=atom"/>
	<link rel="alternate" type="text/html" href="https://www.campisano.org/wiki/Debian_based_home_wifi_router/history"/>
	<updated>2026-04-11T04:41:19Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://www.campisano.org/mediawiki/index.php?title=Debian_based_home_wifi_router&amp;diff=2762&amp;oldid=prev</id>
		<title>T1t0: Created page with &quot;= Optional =  Install etckeeper and sshd  = Setup connection from linux router to internet =  &lt;pre&gt; apt-get install pppoeconf pppoeconf &lt;/pre&gt;  = Enable wireless access point for internal network = &lt;pre&gt; apt-get install hostapd # note that it is in a maksked status, it needs to be configured systemctl status hostapd.service # define the config file sed -i &#039;s|#DAEMON_CONF=&quot;&quot;|DAEMON_CONF=&quot;/etc/hostapd/hostapd.conf&quot;|g&#039; /etc/default/hostapd # configure, please change YOUR_IN...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.campisano.org/mediawiki/index.php?title=Debian_based_home_wifi_router&amp;diff=2762&amp;oldid=prev"/>
		<updated>2024-06-01T22:25:19Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Optional =  Install etckeeper and sshd  = Setup connection from linux router to internet =  &amp;lt;pre&amp;gt; apt-get install pppoeconf pppoeconf &amp;lt;/pre&amp;gt;  = Enable wireless access point for internal network = &amp;lt;pre&amp;gt; apt-get install hostapd # note that it is in a maksked status, it needs to be configured systemctl status hostapd.service # define the config file sed -i &amp;#039;s|#DAEMON_CONF=&amp;quot;&amp;quot;|DAEMON_CONF=&amp;quot;/etc/hostapd/hostapd.conf&amp;quot;|g&amp;#039; /etc/default/hostapd # configure, please change YOUR_IN...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Optional =&lt;br /&gt;
&lt;br /&gt;
Install etckeeper and sshd&lt;br /&gt;
&lt;br /&gt;
= Setup connection from linux router to internet =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt-get install pppoeconf&lt;br /&gt;
pppoeconf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Enable wireless access point for internal network =&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt-get install hostapd&lt;br /&gt;
# note that it is in a maksked status, it needs to be configured&lt;br /&gt;
systemctl status hostapd.service&lt;br /&gt;
# define the config file&lt;br /&gt;
sed -i &amp;#039;s|#DAEMON_CONF=&amp;quot;&amp;quot;|DAEMON_CONF=&amp;quot;/etc/hostapd/hostapd.conf&amp;quot;|g&amp;#039; /etc/default/hostapd&lt;br /&gt;
# configure, please change YOUR_INTERFACE, YOUR_COUNTRY, YOUR_SSID and YOUR_PASSWORD!&lt;br /&gt;
cat &amp;gt; /etc/hostapd/hostapd.conf &amp;lt;&amp;lt; EOF&lt;br /&gt;
# from https://wiki.gentoo.org/wiki/Hostapd#802.11b.2Fg.2Fn_with_WPA2-PSK_and_CCMP&lt;br /&gt;
&lt;br /&gt;
# the interface used by the AP&lt;br /&gt;
interface=YOUR_INTERFACE&lt;br /&gt;
&lt;br /&gt;
# &amp;quot;g&amp;quot; simply means 2.4GHz band&lt;br /&gt;
hw_mode=g&lt;br /&gt;
&lt;br /&gt;
# the channel to use&lt;br /&gt;
channel=11&lt;br /&gt;
&lt;br /&gt;
# limit the frequencies used to those allowed in the country&lt;br /&gt;
ieee80211d=1&lt;br /&gt;
&lt;br /&gt;
# the country code&lt;br /&gt;
country_code=YOUR_COUNTRY&lt;br /&gt;
&lt;br /&gt;
# 802.11n support&lt;br /&gt;
ieee80211n=1&lt;br /&gt;
&lt;br /&gt;
# QoS support, also required for full speed on 802.11n/ac/ax&lt;br /&gt;
wmm_enabled=1&lt;br /&gt;
&lt;br /&gt;
# the name of the AP&lt;br /&gt;
ssid=YOUR_SSID&lt;br /&gt;
&lt;br /&gt;
# 1=wpa, 2=wep, 3=both&lt;br /&gt;
auth_algs=1&lt;br /&gt;
&lt;br /&gt;
# WPA2 only&lt;br /&gt;
wpa=2&lt;br /&gt;
wpa_key_mgmt=WPA-PSK&lt;br /&gt;
wpa_pairwise=CCMP&lt;br /&gt;
rsn_pairwise=CCMP&lt;br /&gt;
wpa_passphrase=YOUR_PASSWORD&lt;br /&gt;
&lt;br /&gt;
# HT capabilities (enabling support for 40MHz)&lt;br /&gt;
ht_capab=[SHORT-GI-40][HT40+][HT40-][DSSS_CCK-40]&lt;br /&gt;
EOF&lt;br /&gt;
systemctl stop hostapd.service&lt;br /&gt;
systemctl unmask hostapd.service&lt;br /&gt;
systemctl enable hostapd.service&lt;br /&gt;
systemctl start hostapd.service&lt;br /&gt;
journalctl --unit=hostapd.service --follow&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Enable IP forwarding and masquerading =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# configure, please change YOUR_INTERFACE!&lt;br /&gt;
cat &amp;gt; /etc/network/if-pre-up.d/forward-masq-YOUR_INTERFACE-ppp0 &amp;lt;&amp;lt; EOF&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
iptables -A INPUT -i ppp0 -m state --state RELATED,ESTABLISHED -j ACCEPT&lt;br /&gt;
iptables -A INPUT -i ppp0 -j DROP&lt;br /&gt;
iptables -A FORWARD -i YOUR_INTERFACE -o ppp0 -j ACCEPT&lt;br /&gt;
iptables -A FORWARD -i ppp0 -o YOUR_INTERFACE -m state --state RELATED,ESTABLISHED -j ACCEPT&lt;br /&gt;
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE&lt;br /&gt;
EOF&lt;br /&gt;
chmod 755 /etc/network/if-pre-up.d/forward-masq-YOUR_INTERFACE-ppp0&lt;br /&gt;
systemctl restart networking&lt;br /&gt;
journalctl --unit=networking.service --follow&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Configure a dhcp and dns server =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt-get install dnsmasq&lt;br /&gt;
# configure, please change YOUR_INTERFACE and YOUR_NET_PREFIX!&lt;br /&gt;
cat &amp;gt; /etc/dnsmasq.conf &amp;lt;&amp;lt; EOF&lt;br /&gt;
# use standard port for dns server&lt;br /&gt;
port=53&lt;br /&gt;
&lt;br /&gt;
# never forward plain names (without a dot or domain part)&lt;br /&gt;
domain-needed&lt;br /&gt;
&lt;br /&gt;
# never forward addresses in the non-routed address spaces.&lt;br /&gt;
bogus-priv&lt;br /&gt;
&lt;br /&gt;
# do not use /etc/resolv.conf or any other file to resolv&lt;br /&gt;
no-resolv&lt;br /&gt;
&lt;br /&gt;
# add other name servers&lt;br /&gt;
server=8.8.8.8&lt;br /&gt;
server=8.8.4.4&lt;br /&gt;
&lt;br /&gt;
# listen for DHCP and DNS requests only on specified interfaces&lt;br /&gt;
# repeat the line for more than one interface&lt;br /&gt;
interface=lo&lt;br /&gt;
interface=YOUR_INTERFACE&lt;br /&gt;
&lt;br /&gt;
# provide only DNS service on specified interface&lt;br /&gt;
no-dhcp-interface=lo&lt;br /&gt;
&lt;br /&gt;
# enable the integrated DHCP server&lt;br /&gt;
# you need to supply the range of addresses available&lt;br /&gt;
dhcp-range=YOUR_NET_PREFIX.100,YOUR_NET_PREFIX.200,255.255.255.0,12h&lt;br /&gt;
EOF&lt;br /&gt;
systemctl restart dnsmasq.service&lt;br /&gt;
journalctl --unit=dnsmasq.service --follow&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:unix]]&lt;br /&gt;
[[Category:linux]]&lt;br /&gt;
[[Category:network]]&lt;br /&gt;
[[Category:wifi]]&lt;br /&gt;
[[Category:router]]&lt;/div&gt;</summary>
		<author><name>T1t0</name></author>
	</entry>
</feed>