Closer...
This commit is contained in:
parent
7398001de6
commit
7e787a9f9f
5 changed files with 19 additions and 13 deletions
|
@ -5,6 +5,4 @@ Name=eth0
|
||||||
[Network]
|
[Network]
|
||||||
DHCP=yes
|
DHCP=yes
|
||||||
Gateway=0.0.0.0/1
|
Gateway=0.0.0.0/1
|
||||||
DNS=8.8.8.8
|
|
||||||
DNS=8.8.4.4
|
|
||||||
IPForward=yes
|
IPForward=yes
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
[Match]
|
[Match]
|
||||||
Name=lan0
|
Name=lan0
|
||||||
# MACAddress=dc:a6:32:0a:b5:84
|
# MACAddress=00:e0:4c:6d:0c:74
|
||||||
|
|
||||||
[Network]
|
[Network]
|
||||||
Address=10.0.0.1/24
|
Address=10.0.0.1/24
|
||||||
IPForward=yes
|
IPForward=yes
|
||||||
IPMasquerade=yes
|
IPMasquerade=ipv4
|
||||||
|
|
12
link.fish
Executable file
12
link.fish
Executable 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
|
2
nftables
2
nftables
|
@ -3,6 +3,8 @@ flush ruleset
|
||||||
table inet filter {
|
table inet filter {
|
||||||
chain input {
|
chain input {
|
||||||
type filter hook input priority filter; policy accept;
|
type filter hook input priority filter; policy accept;
|
||||||
|
udp dport 546 accept
|
||||||
|
udp dport 53 accept
|
||||||
ct state { established, related } accept
|
ct state { established, related } accept
|
||||||
ct state invalid drop
|
ct state invalid drop
|
||||||
iifname "lo" accept
|
iifname "lo" accept
|
||||||
|
|
12
readme.md
12
readme.md
|
@ -1,9 +1,3 @@
|
||||||
+ Guide: https://wiki.archlinux.org/title/router
|
# TODO
|
||||||
+ Interfaces configuration:
|
|
||||||
+ See `/etc/systemd/network`
|
+ IPv6?
|
||||||
+ 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`
|
|
||||||
|
|
Loading…
Reference in a new issue