Skip to content

Instantly share code, notes, and snippets.

@MitchRatquest
Created May 2, 2019 21:36
Embed
What would you like to do?
general routing setup
#!/bin/bash
#assuming appliance is a dns server on another network
#and you want to be able to talk to those clients on that network
#and you can ssh into the appliance
#this might be useful if you dont want to use iptables
appliance="192.168.100.76"
route add -net 172.18.0.0 netmask 255.255.0.0 gw "$appliance"
ssh root@"$appliance" route add -net 172.18.0.0 netmask 255.255.0.0 gw 172.18.0.1; echo "1" > /proc/sys/net/ipv4/ip_forward;
#should you need to delete the route, use this:
route del -net 172.18.0.0 netmask 255.255.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment