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


Ignore:
Timestamp:
Jun 7, 2012, 7:27:57 PM (12 years ago)
Author:
akoshibe
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/OpenFlow/miscUnix

    v11 v12  
    1010 * process I/O redirection (gdb)
    1111 * fixing garbled text (gcc)
     12[#net Network] Various networking-related things.
     13 * Linux NAT box with `ufw`
    1214[#print Printing] quick CUPS setup [[BR]]
    1315[#fortune one-liners] miscellaneous single-sentence tips. [[BR]]
     
    150152Set it the same for both local and remote machines if it's happening over SSH.
    151153----
     154= Networking-related odds and ends = #net
     155Various non-experimental network setups, usually done for convenience.
     156== NAT box with `ufw`. ==
     157source: https://nowhere.dk/articles/tip_nat_with_ubuntus_ufw_firewall
     158`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:
     159 1. configure IP forwarding
     160edit /etc/default/ufw :
     161{{{
     162DEFAULT_FORWARD_POLICY="ACCEPT"
     163}}}
     164and /etc/ufw/sysctl.conf :
     165{{{
     166net.ipv4.ip_forward=1
     167}}}
     168 2. set up IP masquerading in `ufw`   
     169edit /etc/ufw/before.rules, just after the header :
     170{{{
     171# nat Table rules
     172 *nat
     173 :POSTROUTING ACCEPT [0:0]
     174
     175 # Forward traffic through ppp0 - Change to match you out-interface
     176 -A POSTROUTING -s 192.168.1.0/24 -o ppp0 -j MASQUERADE
     177
     178 # don't delete the 'COMMIT' line or these nat table rules won't
     179 # be processed
     180 COMMIT
     181}}}
     182The address block after -s should match the address block behind the NAT firewall.
     183
     184 3. restart ufw:
     185{{{
     186sudo ufw disable && sudo ufw enable
     187}}}
     188
     189----
    152190== Printing setup with CUPS. == #print
    153191 * ref: http://linuxcourse.rutgers.edu/howto/cups_printing.html