Skip to content

Instantly share code, notes, and snippets.

@avagin
Created March 27, 2014 11:36
Show Gist options
  • Save avagin/9805620 to your computer and use it in GitHub Desktop.
Save avagin/9805620 to your computer and use it in GitHub Desktop.
systemctl stop firewalld.service
modprobe ip_gre
modprobe ip_nat_pptp
modprobe ip_conntrack_pptp
pppd call pptpserver
ip netns add test
ip link add name veth0 type veth peer name veth1
ip link set dev veth0 netns test
ip link set up dev veth1
ip a add 192.168.101.3/24 dev veth1
ip netns exec test ip link set up dev veth0
ip netns exec test ip a add 192.168.101.2/24 dev veth0
ip netns exec test ip r add default via 192.168.101.3
iptables -t nat -A POSTROUTING -s 192.168.101.0/24 -o eth0 -j SNAT --to 192.168.122.39
echo function > /sys/kernel/debug/tracing/current_tracer
sysctl -w net.ipv4.ip_forward=1
sysctl -w net.ipv4.conf.all.forwarding=1
echo nf_ct_gre_keymap_flush > /sys/kernel/debug/tracing/set_ftrace_filter
echo nf_ct_gre_keymap_destroy >> /sys/kernel/debug/tracing/set_ftrace_filter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment