Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```
- # Edit /etc/NetworkManager/NetworkManager.conf adding the following
- # to make network manager stop managing your ethernet interface
- [keyfile]
- unmanaged-devices=mac:3c:90:01:39:b2:62;
- # Use the MAC address from your ethernet card
- # You can get the MAC address with the command:
- ip link show dev eth0
- # (assuming your ethernet device is called eth0)
- # restart network-manager to pick up the changes
- sudo service network-manager restart
- # Install dnsmasq
- sudo apt install dnsmasq
- # Add the following line to /etc/dnsmasq.conf
- dhcp-range=172.23.0.50,172.23.0.200,12h
- # Run the following to turn you computer into a gateway
- # (replace eth0 with your ethernet interface name)
- # (replace wlan0 with your wifi interface name)
- ifconfig eth0 172.23.0.1 netmask 255.255.255.0 up
- echo "1" > /proc/sys/net/ipv4/ip_forward
- iptables -P FORWARD ACCEPT
- iptables -t nat -F POSTROUTING
- iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
- /etc/init.d/dnsmasq restart
- # Connect another computer to your ethernet port and it should get an IP using DHCP and have internet access
- ```
Add Comment
Please, Sign In to add comment