Update: this can cause some of your ssh sessions to hang, so be aware of that.
Add this to your ~/.ssh/config
Host myserver.mydomain.com
ControlMaster auto
ControlPath /tmp/%r@%h:%p
Then, say you have root access via your ssh pub key
mkdir tmp001
sshfs -o uid=1000 root@myserver.mydomain.com:/var/www tmp001
Now, the files in tmp001 map to your remote /var/www directory. And access to them uses an ssh session that is maintained in your /tmp directory, i.e. all interactions are performed over the same ssh session.
To see the tmp file, if you just opened the sshfs session in the last 10 mins
find /tmp -mmin -10 -ls
Showing posts with label local. Show all posts
Showing posts with label local. Show all posts
Wednesday, 6 August 2014
Thursday, 5 June 2014
OpenVPN: push all LAN traffic through an OpenVPN client to the other side
- Local variables for this post, adjust to fit your setup:
- OpenVPN client server IP
- 192.168.1.200
- Remote network
- 172.16.1.0/24
- Add this to the client server that is using OpenVPN to connect to the remote server:
- sudo iptables -A POSTROUTING -o tun0 -j MASQUERADE
- as root user, do
- echo 1 > /proc/sys/net/ipv4/ip_forward
- Add this to your local computer
- Linux:
- ip route add 172.16.1.0/24 via 192.168.1.200
- Mac:
- route -n add 172.16.1.0/24 192.168.1.200
NOTE: take a look at /etc/sysctl.conf if you want the ip_forward to last through reboots of client server: net.ipv4.ip_forward=1
Wednesday, 28 May 2014
unbound: custom records
server:
verbosity: 1
interface: 0.0.0.0
access-control: 10.0.0.0/8 allow
local-zone: "mydomain.internal" static
local-data: "app01.mydomain.internal IN A 10.0.0.10"
local-data: "app02.mydomain.internal IN A 10.0.0.11"
local-data: "biggie01.mydomain.internal IN A 10.0.0.12"
local-data: "mysql01.mydomain.internal IN A 10.0.0.20"
local-data: "mysql02.mydomain.internal IN A 10.0.0.31"
local-data: "apache01.mydomain.internal IN A 10.0.0.200"
verbosity: 1
interface: 0.0.0.0
access-control: 10.0.0.0/8 allow
local-zone: "mydomain.internal" static
local-data: "app01.mydomain.internal IN A 10.0.0.10"
local-data: "app02.mydomain.internal IN A 10.0.0.11"
local-data: "biggie01.mydomain.internal IN A 10.0.0.12"
local-data: "mysql01.mydomain.internal IN A 10.0.0.20"
local-data: "mysql02.mydomain.internal IN A 10.0.0.31"
local-data: "apache01.mydomain.internal IN A 10.0.0.200"
Subscribe to:
Posts (Atom)
Interview questions: 2020-12
Terraform provider vs provisioner Load balancing Network Load Balancer vs Application Load Balancer Networking Layer 1 vs Layer 4 haproxy u...
-
CRITICAL: AWS now offers internal VPC DNS! Below is no longer necessary AFAIK. Woo hoo! http://aws.amazon.com/about-aws/whats-new/2014/...
-
build sudo apt-get install git gcc sudo apt-get install automake autoconf git clone git://github.com/rriley/tsunami-udp.git cd tsunam...
-
From: https://bugs.eclipse.org/bugs/show_bug.cgi?id=382972#c4 Assumptions: jEdit was installed into /Applications directory. Close any...