Closer...

This commit is contained in:
Daniel Flanagan 2021-07-10 14:04:31 -05:00
parent 7398001de6
commit 7e787a9f9f
5 changed files with 19 additions and 13 deletions

View file

@ -5,6 +5,4 @@ Name=eth0
[Network]
DHCP=yes
Gateway=0.0.0.0/1
DNS=8.8.8.8
DNS=8.8.4.4
IPForward=yes

View file

@ -1,8 +1,8 @@
[Match]
Name=lan0
# MACAddress=dc:a6:32:0a:b5:84
# MACAddress=00:e0:4c:6d:0c:74
[Network]
Address=10.0.0.1/24
IPForward=yes
IPMasquerade=yes
IPMasquerade=ipv4

12
link.fish Executable file
View file

@ -0,0 +1,12 @@
#!/usr/bin/env fish
function rmlink
rm -f $argv[1]
ezln $argv[1] $argv[2]
end
rmlink dnsmasq.conf /etc/dnsmasq.conf
rmlink usb-ethernet-as-lan0.link /etc/systemd/network/10-usb-eth-adapter.link
cp eth0.network /etc/systemd/network/eth0.network
cp lan0.network /etc/systemd/network/lan0.network

View file

@ -3,6 +3,8 @@ flush ruleset
table inet filter {
chain input {
type filter hook input priority filter; policy accept;
udp dport 546 accept
udp dport 53 accept
ct state { established, related } accept
ct state invalid drop
iifname "lo" accept

View file

@ -1,9 +1,3 @@
+ Guide: https://wiki.archlinux.org/title/router
+ Interfaces configuration:
+ See `/etc/systemd/network`
+ DNS & LAN DHCP
+ See `/etc/dnsmasq.conf`
+ See `/etc/sysctl.d/30-ipforward.conf`
+ Firewall & NAT
+ See `sudo iptables --list`
+ See `cat /etc/iptables/iptables.rules`
# TODO
+ IPv6?