Last active
August 29, 2015 14:27
-
-
Save enricostano/bc5f8ecd7c4614448ade to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# /etc/systemd/network/br0.netdev | |
[NetDev] | |
Name=br0 | |
Kind=bridge |
This file contains hidden or 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
# /etc/systemd/network/br0.network | |
[Match] | |
Name=br0 | |
[Network] | |
Address=10.0.3.1/24 |
This file contains hidden or 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
λ brctl show br0 | |
bridge name bridge id STP enabled interfaces | |
br0 8000.c27be397d24c no vethVER4VO |
This file contains hidden or 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
Chain PREROUTING (policy ACCEPT 6 packets, 552 bytes) | |
pkts bytes target prot opt in out source destination | |
Chain INPUT (policy ACCEPT 6 packets, 552 bytes) | |
pkts bytes target prot opt in out source destination | |
Chain OUTPUT (policy ACCEPT 134 packets, 8894 bytes) | |
pkts bytes target prot opt in out source destination | |
Chain POSTROUTING (policy ACCEPT 134 packets, 8894 bytes) | |
pkts bytes target prot opt in out source destination | |
0 0 MASQUERADE all -- * wlan0 10.0.3.0/24 0.0.0.0/0 |
This file contains hidden or 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
# Generated by iptables-save v1.4.21 on Sun Aug 23 16:02:57 2015 | |
*filter | |
:INPUT ACCEPT [587:329452] | |
:FORWARD ACCEPT [0:0] | |
:OUTPUT ACCEPT [543:53206] | |
COMMIT | |
# Completed on Sun Aug 23 16:02:57 2015 | |
# Generated by iptables-save v1.4.21 on Sun Aug 23 16:02:57 2015 | |
*nat | |
:PREROUTING ACCEPT [0:0] | |
:INPUT ACCEPT [0:0] | |
:OUTPUT ACCEPT [0:0] | |
:POSTROUTING ACCEPT [0:0] | |
-A POSTROUTING -s 10.0.3.0/24 -o wlan0 -j MASQUERADE | |
COMMIT | |
# Completed on Sun Aug 23 16:02:57 2015 |
This file contains hidden or 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
~ λ sudo route -n | |
Kernel IP routing table | |
Destination Gateway Genmask Flags Metric Ref Use Iface | |
0.0.0.0 192.168.1.1 0.0.0.0 UG 302 0 0 wlan0 | |
10.0.3.0 0.0.0.0 255.255.255.0 U 0 0 0 br0 | |
192.168.1.0 0.0.0.0 255.255.255.0 U 302 0 0 wlan0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment