Skip to content

Instantly share code, notes, and snippets.

@bndabbs
Last active July 15, 2016 05:24
Show Gist options
  • Save bndabbs/6cef9d9471dbba96d9a3351fb2770330 to your computer and use it in GitHub Desktop.
Save bndabbs/6cef9d9471dbba96d9a3351fb2770330 to your computer and use it in GitHub Desktop.

http://ronnybull.com/2015/11/20/how-to-centos-7-router/

Enable IP forwarding

Add ZONE= to ifcfg files

sudo firewall-cmd --permanent --direct --passthrough ipv4 -t nat -I POSTROUTING -o em1 -j MASQUERADE -s x.x.x.0/24

sudo firewall-cmd --set-default-zone=internal

sudo firewall-cmd --permanent --zone=external --remove-service=ssh

Add ssh key

Disable root login

Disable password login

Disable hibernate when closing laptop lid

Set HandleLidSwitch=ignore in /etc/systemd/logind.conf

sudo systemctl restart systemd-logind

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment