Changes between Version 12 and Version 13 of Internal/OpenFlow/miscUnix


Ignore:
Timestamp:
Jun 12, 2012, 9:36:56 PM (12 years ago)
Author:
akoshibe
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/OpenFlow/miscUnix

    v12 v13  
    1111 * fixing garbled text (gcc)
    1212[#net Network] Various networking-related things.
    13  * Linux NAT box with `ufw`
     13 * NAT box methods
     14  * with `ufw`
     15  * with `pf`
    1416[#print Printing] quick CUPS setup [[BR]]
    1517[#fortune one-liners] miscellaneous single-sentence tips. [[BR]]
     
    154156= Networking-related odds and ends = #net
    155157Various non-experimental network setups, usually done for convenience.
    156 == NAT box with `ufw`. ==
     158== NAT boxes. ==
     159=== with `ufw` ===
    157160source: https://nowhere.dk/articles/tip_nat_with_ubuntus_ufw_firewall
    158161`ufw` is your standard Linux firewall, and comes with Ubuntu server edition. Turning a multi-interface Linux box into a router is a matter of the following steps:
     
    187190}}}
    188191
     192=== with `pf` ===
     193`pf` is the OpenBSD packet filter, a piece of software intended for heavy-duty packet filtering/firewalls and comes with some Berkeley UNIX variants^2^. 
     194Assuming you have IP forwarding enabled, the following configuration in /etc/pf.conf should give you a NAT firewall:
     195{{{
     196ext_if="bge0"
     197int_if="em0"
     198external_addr="192.168.203.155"
     199internal_net="192.168.1.0/24"
     200nat on $ext_if from $internal_net to any -> ($ext_if)
     201pass in all
     202pass out all
     203}}}
     204`ext_if` is the interface facing the external network, and `int_if` is the interface connected to your NATed net.
     205Once saved, start `pf`:
     206{{{
     207sudo pfctl -e -f /etc/pf.conf
     208}}}
     209If it throws errors, make sure that the kernel module (pf.ko or something similar) is loaded.
    189210----
    190211== Printing setup with CUPS. == #print
     
    221242----
    222243^1. Me being the person that I am will have likely tried these on FreeBSD and maybe lubuntu to see that they work there as well.^
     244^2. See 1.^