Created
May 2, 2019 21:36
-
-
Save MitchRatquest/f845417331779dfb49b7cd51e1b50c23 to your computer and use it in GitHub Desktop.
general routing setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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