summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiao Pan <xyz@flylightning.xyz>2025-07-24 18:05:40 +0000
committerXiao Pan <xyz@flylightning.xyz>2025-07-24 18:05:40 +0000
commita0b815b570a125bb14bfec9198b4761b69449c75 (patch)
tree70aa099f9ff07a017c9e45e19a13413d50b675ca
parentd6d8c888da1519f630c13231682f49f0c18b2a75 (diff)
nft use /etc/services phantun port name instead of 59083 port number
-rw-r--r--etc/nftables.conf6
-rw-r--r--etc/services2
2 files changed, 5 insertions, 3 deletions
diff --git a/etc/nftables.conf b/etc/nftables.conf
index 52bacd38..149beab1 100644
--- a/etc/nftables.conf
+++ b/etc/nftables.conf
@@ -32,7 +32,7 @@ table inet my_table {
udp dport swgp accept
tcp dport monerod-p2p accept
# phantun
- tcp dport 59083 accept
+ tcp dport phantun accept
pkttype host limit rate 5/second counter reject with icmpx type admin-prohibited
counter comment "count any other traffic"
@@ -75,8 +75,8 @@ table inet nat {
iifname $pub_iface tcp dport monerod-p2p dnat ip to 10.0.0.1:monerod-p2p
iifname $pub_iface tcp dport monerod-p2p dnat ip6 to [fdc9:281f:04d7:9ee9::1]:monerod-p2p
# needed for phantun
- iif $pub_iface tcp dport 59083 dnat ip to 10.0.2.2
- iif $pub_iface tcp dport 59083 dnat ip6 to fdc9:281f:04d7:9eeb::2
+ iif $pub_iface tcp dport phantun dnat ip to 10.0.2.2
+ iif $pub_iface tcp dport phantun dnat ip6 to fdc9:281f:04d7:9eeb::2
}
# for all packets to $pub_iface, after routing, replace source address with primary IP of $pub_iface interface
chain postrouting {
diff --git a/etc/services b/etc/services
index 2fd08222..1b762adf 100644
--- a/etc/services
+++ b/etc/services
@@ -11524,3 +11524,5 @@ monerod-p2p 18080/tcp
wireguard 49432/udp
iperf3 53497/tcp
swgp 54635/udp
+# phantun server listen
+phantun 59083/tcp