Skip to content

Instantly share code, notes, and snippets.

@nitrate92
Last active April 15, 2024 20:27
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nitrate92/6f67518c79b769c02e9a12beb0bb87eb to your computer and use it in GitHub Desktop.
Save nitrate92/6f67518c79b769c02e9a12beb0bb87eb to your computer and use it in GitHub Desktop.
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
add rule ip nat PREROUTING ip daddr 204.254.74.0-204.254.74.255 counter dnat to $ServerIP
add rule ip nat PREROUTING ip daddr 207.76.180.0-207.76.180.255 counter dnat to $ServerIP
add rule ip nat PREROUTING ip daddr 209.240.194.0-209.240.194.255 counter dnat to $ServerIP
#add rule ip nat PREROUTING ip daddr 210.150.22.0-210.150.22.255 counter dnat to $ServerIP
add rule ip nat PREROUTING ip daddr 157.57.221.51 counter dnat to $DNS
add rule ip nat PREROUTING ip daddr 210.150.22.35 counter dnat to $DNS
add rule ip nat PREROUTING ip daddr 210.150.22.65 counter dnat to $DNS
#Don't forget to add to your postroutes!
add rule ip nat POSTROUTING ip saddr $ServerIP counter snat to 10.0.0.0-10.0.255.255
add rule ip nat POSTROUTING ip saddr $ServerIP counter snat to 192.168.102.0-192.168.102.255
add rule ip nat POSTROUTING ip saddr $ServerIP counter snat to 204.254.74.0-204.254.74.255
add rule ip nat POSTROUTING ip saddr $ServerIP counter snat to 207.76.180.0-207.76.180.255
add rule ip nat POSTROUTING ip saddr $ServerIP counter snat to 209.240.194.0-209.240.194.255
#add rule ip nat POSTROUTING ip saddr $ServerIP counter snat to 210.150.22.0-210.150.22.255
add rule ip nat POSTROUTING ip saddr $DNS counter snat to 157.57.221.51
add rule ip nat POSTROUTING ip saddr $DNS counter snat to 210.150.22.35
add rule ip nat POSTROUTING ip saddr $DNS counter snat to 210.150.22.65
@SKCro
Copy link

SKCro commented Jun 1, 2023

webtv nft real 😱 😱 😱 πŸ€“ 😱

@SachaTending
Copy link

webtv nft real

@avegee24
Copy link

avegee24 commented Jan 4, 2024

webtv nft real 😱 😱 😱 πŸ€“ 😱

@izzint
Copy link

izzint commented Jan 4, 2024

webtv nft real 😱 😱 😱 πŸ€“ 😱

@izzint
Copy link

izzint commented Jan 4, 2024

why Is it on fire

@Flamelord626
Copy link

webtv nft real 😱 😱 😱 πŸ€“ 😱

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment