You are not logged in.

#1 2016-05-23 05:38:11

xanb
Member
Registered: 2012-07-24
Posts: 418

Porting iptables rules to ufw

Hi,

I'm completely new in that. I want to port iptables rules to ufw for not interfering... My rules are:

# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
# iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
# iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT

How can I transform to UFW rules? I think I have to put in /etc/ufw/after.rules, have I?


Owning one OpenRC (artoo way) and other three systemd machines

Offline

#2 2016-05-23 09:29:40

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: Porting iptables rules to ufw

I'm not sure what you mean by "for not interfering".  But have you tried the available documentation? For example,

https://wiki.archlinux.org/index.php/Un … d_Firewall
https://help.ubuntu.com/community/UFW


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#3 2016-05-23 12:44:00

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: Porting iptables rules to ufw

xanb, you are aware UFW is just a frontend for iptables ?

Check Ubuntu UFW official server guide


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#4 2016-05-23 15:54:47

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: Porting iptables rules to ufw

See the wiki for an article using use within lxc ... There is a pre file you can edit with these lines I believe.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB