Skip to content

Instantly share code, notes, and snippets.

View nitrate92's full-sized avatar
🅱️
wowza

nitrate92

🅱️
wowza
  • hell
  • 03:40 (UTC -04:00)
View GitHub Profile
@nitrate92
nitrate92 / halenSPA2102.xml
Created September 10, 2023 07:10
Personal Linksys SPA2102 config.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<flat-profile xmlns="http://www.sipura.net/xsd/SPA2102" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sipura.net/xsd/SPA2102 http://www.sipura.net/xsd/SPA2102/SPA2102-5-2-10.xsd">
<!-- System Configuration -->
<Restricted_Access_Domains ua="na"></Restricted_Access_Domains>
<Enable_Web_Admin_Access ua="na">Yes</Enable_Web_Admin_Access>
<Admin_Passwd ua="na">admin</Admin_Passwd>
<User_Password ua="rw">admin</User_Password>
@nitrate92
nitrate92 / webtv.nft
Last active April 15, 2024 20:27
Service routes for connecting a WebTV unit to a custom server/DNS. Now in NFTables. (what an unfortunate name) Run w/ sudo nft -f webtv.nft and if you experience issues please refer to the old commit at https://gist.github.com/nitrate92/6f67518c79b769c02e9a12beb0bb87eb/0db9649d80f5b53be573ef0e44653683b0b1a201
# Somewhat experimental version of the WebTV nftables script. Uses IP ranges to cut down on the amount of lines.
define ServerIP = 192.161.48.92 #51.222.164.146 #71.244.121.234
define DNS = 9.9.9.9 #Quad9 DNS Service (https://www.quad9.net/)
add table ip nat
add chain ip nat PREROUTING { type nat hook prerouting priority -100; policy accept; }
add chain ip nat INPUT { type nat hook input priority 100; policy accept; }
add chain ip nat OUTPUT { type nat hook output priority -100; policy accept; }
add chain ip nat POSTROUTING { type nat hook postrouting priority 100; policy accept; }
add rule ip nat PREROUTING ip daddr 10.0.0.0-10.0.255.255 counter dnat to $ServerIP
add rule ip nat PREROUTING ip daddr 192.168.102.0-192.168.102.255 counter dnat to $ServerIP
@nitrate92
nitrate92 / webtv-routes.sh
Last active June 16, 2022 16:11
Service routes used for connecting a WebTV unit to a custom server. **OUTDATED: USE NFTABLES https://gist.github.com/nitrate92/6f67518c79b769c02e9a12beb0bb87eb
#!/bin/bash
#Halen's not stolen and reworked WebTV routes script **OUTDATED: USE NFTABLES https://gist.github.com/nitrate92/6f67518c79b769c02e9a12beb0bb87eb**
#clears iptables stuff, useful if you change routes in this file and then execute again
sudo iptables -F
sudo iptables -X
sudo iptables -Z
sudo iptables -t nat -F
sudo iptables -t nat -X
sudo iptables -t mangle -F
sudo iptables -t mangle -X