Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include setup documentation for bridged networks #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 20 additions & 0 deletions README.md
Expand Up @@ -60,6 +60,26 @@ Because we need to "hijack" traffic to the metadata API IP address `169.254.169.
`iptables -t nat -A PREROUTING -d 169.254.169.254 -p tcp --dport 80 --syn -j REDIRECT --to-port 1024`
Don't forget to persist this iptables rule across reboots with some sort of script (`iptables-persistent` apt package is a good candidate)

Kernel Parameters
-----------------
Newer kernels require kernel parameters to be set in order for iptables to intercept traffic over bridged networks

You must enable the `br_netfilter` kernel module with this command:

`modprobe br_netfilter`

Then, enable the kernel settings:

`sysctl -w net.bridge.bridge-nf-call-arptables=1`


`sysctl -w net.bridge.bridge-nf-call-iptable=1`


Make sure you set the parameters in `/etc/sysctl.conf` to persist across reboots

See here for more info: http://wiki.libvirt.org/page/Net.bridge.bridge-nf-call_and_sysctl.conf

Known issues
------------

Expand Down