Changes between Version 12 and Version 13 of Internal/OpenFlow/miscUnix
- Timestamp:
- Jun 12, 2012, 9:36:56 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Internal/OpenFlow/miscUnix
v12 v13 11 11 * fixing garbled text (gcc) 12 12 [#net Network] Various networking-related things. 13 * Linux NAT box with `ufw` 13 * NAT box methods 14 * with `ufw` 15 * with `pf` 14 16 [#print Printing] quick CUPS setup [[BR]] 15 17 [#fortune one-liners] miscellaneous single-sentence tips. [[BR]] … … 154 156 = Networking-related odds and ends = #net 155 157 Various non-experimental network setups, usually done for convenience. 156 == NAT box with `ufw`. == 158 == NAT boxes. == 159 === with `ufw` === 157 160 source: https://nowhere.dk/articles/tip_nat_with_ubuntus_ufw_firewall 158 161 `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: … … 187 190 }}} 188 191 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^. 194 Assuming you have IP forwarding enabled, the following configuration in /etc/pf.conf should give you a NAT firewall: 195 {{{ 196 ext_if="bge0" 197 int_if="em0" 198 external_addr="192.168.203.155" 199 internal_net="192.168.1.0/24" 200 nat on $ext_if from $internal_net to any -> ($ext_if) 201 pass in all 202 pass out all 203 }}} 204 `ext_if` is the interface facing the external network, and `int_if` is the interface connected to your NATed net. 205 Once saved, start `pf`: 206 {{{ 207 sudo pfctl -e -f /etc/pf.conf 208 }}} 209 If it throws errors, make sure that the kernel module (pf.ko or something similar) is loaded. 189 210 ---- 190 211 == Printing setup with CUPS. == #print … … 221 242 ---- 222 243 ^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.^