]>
Commit | Line | Data |
---|---|---|
0e79507b | 1 | # |
f0f3ff9d | 2 | # TODO: |
38cb39b1 JB |
3 | # - recheck ebtables functionality: |
4 | # - is it still valid: "The original old ebtables is still needed e.g. for libvirt's nwfilter"? | |
5 | # - is ebtables init script/service usable with iptables ebtables implementation now? | |
6 | # if so, then move them here from legacy ebtables.spec | |
c0ae8513 | 7 | # - update BR to real required llh version |
f0f3ff9d | 8 | # |
0e79507b | 9 | # Conditional build: |
2c4686e4 JB |
10 | %bcond_without doc # HOWTOS documentation (which requires TeX) |
11 | %bcond_without dist_kernel # distribution (patched) kernel enhancements (alias for with: ipt_IPV4OPTSSTRIP ipt_rpc xt_layer7) | |
1a1801c3 | 12 | %bcond_without nftables # nftables compatibility |
61d2127f | 13 | %bcond_without pcap # pcap-dependend utils (nfbpf_compile, nfsynproxy) |
2c4686e4 JB |
14 | %bcond_with vserver # xt_owner module with vserver support |
15 | %bcond_with batch # iptables-batch utils | |
16 | %bcond_with static # static libraries, no dynamic modules (all linked into binaries) | |
17 | %bcond_with ipt_IPV4OPTSSTRIP # ipt_IPV4OPTSSTRIP module (requires kernel patch to work) | |
18 | %bcond_with ipt_rpc # ipt_rpc module (requires kernel patch to work) | |
19 | %bcond_with xt_layer7 # xt_layer7 module (requires kernel patch to work) | |
c0ae8513 JB |
20 | %bcond_with usekernelsrc # include kernel headers from %{_kernelsrcdir} |
21 | ||
22 | %if %{with dist_kernel} | |
23 | %define with_ipt_IPV4OPTSSTRIP 1 | |
24 | %define with_ipt_rpc 1 | |
25 | %define with_xt_layer7 1 | |
c0ae8513 | 26 | %endif |
655beef5 | 27 | |
511b0491 AM |
28 | %define orgname iptables |
29 | ||
0e79507b | 30 | Summary: Extensible packet filtering system && extensible NAT system |
e8c37038 ER |
31 | Summary(pl.UTF-8): System filtrowania pakietów oraz system translacji adresów (NAT) |
32 | Summary(pt_BR.UTF-8): Ferramenta para controlar a filtragem de pacotes no kernel-2.6.x | |
33 | Summary(ru.UTF-8): Утилиты для управления пакетными фильтрами ядра Linux | |
34 | Summary(uk.UTF-8): Утиліти для керування пакетними фільтрами ядра Linux | |
35 | Summary(zh_CN.UTF-8): Linux内核包过滤管理工具 | |
4869bea7 | 36 | Name: iptables%{?with_vserver:-vserver} |
4a54d3f7 | 37 | Version: 1.8.6 |
67c1b03a | 38 | Release: 1 |
a0c2c091 | 39 | License: GPL v2 |
07594664 | 40 | Group: Networking/Admin |
8280a5f8 | 41 | Source0: https://netfilter.org/projects/iptables/files/%{orgname}-%{version}.tar.bz2 |
4a54d3f7 | 42 | # Source0-md5: bc0f0adccc93c09dc5b7507ccba93148 |
511b0491 | 43 | Source1: cvs://cvs.samba.org/netfilter/%{orgname}-howtos.tar.bz2 |
0e79507b | 44 | # Source1-md5: 2ed2b452daefe70ededd75dc0061fd07 |
705102f6 JB |
45 | Source2: iptables.init |
46 | Source3: ip6tables.init | |
47 | Source6: iptables-config | |
48 | Source7: ip6tables-config | |
49 | Source8: iptables.service | |
50 | Source9: ip6tables.service | |
a540a457 | 51 | # these are not compatible with this package! there are no ebtables-save and ebtables-restore here |
9ec3dc4d JR |
52 | Source10: ebtables.init |
53 | Source11: ebtables-config | |
54 | Source12: ebtables.service | |
c0ae8513 | 55 | # --- GENERAL CHANGES (patches<10): |
511b0491 | 56 | Patch0: %{orgname}-man.patch |
d973e24a | 57 | # additional utils; off by default |
511b0491 | 58 | Patch1: %{orgname}-batch.patch |
4e86922f | 59 | Patch2: no-libiptc.patch |
511b0491 | 60 | Patch3: %{orgname}-aligned_u64.patch |
d13a1305 | 61 | Patch4: %{orgname}-link.patch |
6461831b | 62 | |
a2f3cd63 | 63 | Patch5: ebtables-X.patch |
c0ae8513 | 64 | # --- ADDITIONAL/CHANGED EXTENSIONS: |
d973e24a | 65 | # just ipt_IPV4OPTSSTRIP now |
511b0491 | 66 | Patch10: %{orgname}-20070806.patch |
a0c2c091 | 67 | # xt_layer7; almost based on iptables-1.4-for-kernel-2.6.20forward-layer7-2.18.patch |
92b2e10a | 68 | # http://downloads.sourceforge.net/l7-filter/netfilter-layer7-v2.18.tar.gz |
511b0491 | 69 | Patch11: %{orgname}-layer7.patch |
a0c2c091 | 70 | # ipt_rpc |
511b0491 | 71 | Patch12: %{orgname}-old-1.3.7.patch |
efecc54e | 72 | # xt_IMQ; http://linuximq.net/patchs/iptables-1.4.12-IMQ-test4.diff |
511b0491 | 73 | Patch13: %{orgname}-imq.patch |
92b2e10a | 74 | # enhances ipt_owner/ip6t_owner; http://people.linux-vserver.org/~dhozac/p/m/iptables-1.3.5-owner-xid.patch (currently disabled, needs update for xt_owner) |
511b0491 | 75 | Patch14: %{orgname}-owner-xid.patch |
d973e24a | 76 | # adjusts xt_owner for vserver-enabled kernel |
511b0491 | 77 | Patch15: %{orgname}-owner-struct-size-vs.patch |
16c27088 | 78 | Patch16: %{orgname}-rpc.patch |
8280a5f8 | 79 | URL: https://netfilter.org/ |
d973e24a | 80 | BuildRequires: autoconf >= 2.50 |
6dc7a739 | 81 | BuildRequires: automake |
1a1801c3 JB |
82 | %{?with_nftables:BuildRequires: bison} |
83 | %{?with_nftables:BuildRequires: flex} | |
92a25fae | 84 | BuildRequires: groff |
1a1801c3 JB |
85 | %{?with_nftables:BuildRequires: libmnl-devel >= 1.0} |
86 | BuildRequires: libnetfilter_conntrack-devel >= 1.0.6 | |
a0c2c091 | 87 | BuildRequires: libnfnetlink-devel >= 1.0 |
67c1b03a | 88 | %{?with_nftables:BuildRequires: libnftnl-devel >= 1.1.6} |
61d2127f | 89 | %{?with_pcap:BuildRequires: libpcap-devel} |
16c27088 | 90 | BuildRequires: libtirpc-devel >= 0.2.0 |
78e5603d | 91 | BuildRequires: libtool |
d973e24a | 92 | BuildRequires: pkgconfig >= 1:0.9.0 |
63a6c82f | 93 | BuildRequires: rpmbuild(macros) >= 1.647 |
0e79507b | 94 | %if %{with doc} |
c7a0fe01 | 95 | BuildRequires: sed >= 4.0 |
0e79507b PS |
96 | BuildRequires: sgml-tools |
97 | BuildRequires: sgmls | |
c322322e | 98 | BuildRequires: tetex-dvips |
6d30ffc5 | 99 | BuildRequires: tetex-format-latex |
c588d6c8 | 100 | BuildRequires: tetex-latex |
0e79507b | 101 | BuildRequires: tetex-tex-babel |
90b6f30d | 102 | BuildRequires: texlive-fonts-cmsuper |
122b99b3 | 103 | BuildRequires: texlive-fonts-jknappen |
199610f3 | 104 | %endif |
c0ae8513 | 105 | BuildRequires: linux-libc-headers >= 7:2.6.22.1 |
511b0491 | 106 | Requires: %{orgname}-libs = %{version}-%{release} |
1a1801c3 JB |
107 | %{?with_nftables:Requires: libmnl >= 1.0} |
108 | Requires: libnetfilter_conntrack >= 1.0.6 | |
d973e24a | 109 | Requires: libnfnetlink >= 1.0 |
67c1b03a | 110 | %{?with_nftables:Requires: libnftnl >= 1.1.6} |
c322322e | 111 | Provides: firewall-userspace-tool |
ad92b1cf | 112 | %{?with_vserver:Provides: iptables = %{version}-%{release}} |
569c416d | 113 | Conflicts: arptables < 0.0.5 |
0e79507b | 114 | Obsoletes: ipchains |
e51026eb | 115 | Obsoletes: iptables24-compat |
c7a0fe01 | 116 | Obsoletes: netfilter |
149c216c | 117 | Conflicts: xtables-addons < 1.25 |
6461831b | 118 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
0e79507b PS |
119 | |
120 | %description | |
121 | An extensible NAT system, and an extensible packet filtering system. | |
cc6a4371 | 122 | Replacement of ipchains in 2.4 and higher kernels. |
0e79507b | 123 | |
30bd20eb JR |
124 | %description -l pl.UTF-8 |
125 | Wydajny system translacji adresów (NAT) oraz system filtrowania | |
126 | pakietów. Zamiennik ipchains w jądrach 2.4 i nowszych. | |
0e79507b | 127 | |
30bd20eb JR |
128 | %description -l pt_BR.UTF-8 |
129 | Esta é a ferramenta que controla o código de filtragem de pacotes do | |
130 | kernel 2.4, obsoletando ipchains. Com esta ferramenta você pode | |
0e79507b | 131 | configurar filtros de pacotes, NAT, mascaramento (masquerading), |
30bd20eb | 132 | regras dinâmicas (stateful inspection), etc. |
0e79507b | 133 | |
30bd20eb JR |
134 | %description -l ru.UTF-8 |
135 | iptables управляют кодом фильтрации сетевых пакетов в ядре Linux. Они | |
136 | позволяют вам устанавливать межсетевые экраны (firewalls) и IP | |
137 | маскарадинг, и т.п. | |
0e79507b | 138 | |
30bd20eb JR |
139 | %description -l uk.UTF-8 |
140 | iptables управляють кодом фільтрації пакетів мережі в ядрі Linux. Вони | |
141 | дозволяють вам встановлювати міжмережеві екрани (firewalls) та IP | |
142 | маскарадинг, тощо. | |
0e79507b | 143 | |
dfc0441a AM |
144 | %package libs |
145 | Summary: iptables libraries | |
146 | Summary(pl.UTF-8): Biblioteki iptables | |
e4e1bc3c | 147 | Group: Libraries |
ae000808 | 148 | Conflicts: iptables < 1.4.3-1 |
dfc0441a AM |
149 | |
150 | %description libs | |
151 | iptables libraries. | |
152 | ||
153 | %description libs -l pl.UTF-8 | |
154 | Biblioteki iptables. | |
155 | ||
0e79507b PS |
156 | %package devel |
157 | Summary: Libraries and headers for developing iptables extensions | |
e8c37038 | 158 | Summary(pl.UTF-8): Biblioteki i nagłówki do tworzenia rozszerzeń iptables |
0e79507b | 159 | Group: Development/Libraries |
511b0491 | 160 | Requires: %{orgname}-libs = %{epoch}:%{version}-%{release} |
e51026eb | 161 | Obsoletes: iptables24-devel |
0e79507b PS |
162 | |
163 | %description devel | |
164 | Libraries and headers for developing iptables extensions. | |
165 | ||
30bd20eb JR |
166 | %description devel -l pl.UTF-8 |
167 | Biblioteki i pliki nagłówkowe niezbędne do tworzenia rozszerzeń dla | |
0e79507b PS |
168 | iptables. |
169 | ||
dfc0441a AM |
170 | %package static |
171 | Summary: Static iptables libraries | |
172 | Summary(pl.UTF-8): Biblioteki statyczne iptables | |
173 | Group: Development/Libraries | |
705102f6 | 174 | Requires: %{orgname}-devel = %{epoch}:%{version}-%{release} |
dfc0441a AM |
175 | |
176 | %description static | |
177 | Static iptables libraries. | |
178 | ||
dbbdf4ad | 179 | %description static -l pl.UTF-8 |
dfc0441a AM |
180 | Biblioteki statyczne iptables. |
181 | ||
0e79507b PS |
182 | %package init |
183 | Summary: Iptables init (RedHat style) | |
e8c37038 | 184 | Summary(pl.UTF-8): Iptables init (w stylu RedHata) |
0e79507b | 185 | Group: Networking/Admin |
c322322e | 186 | Requires(post,preun): /sbin/chkconfig |
63a6c82f | 187 | Requires(post,preun,postun): systemd-units >= 38 |
ad92b1cf | 188 | Requires: %{name} = %{version}-%{release} |
655beef5 | 189 | Requires: rc-scripts >= 0.4.3.0 |
63a6c82f | 190 | Requires: systemd-units >= 38 |
0e79507b | 191 | Obsoletes: firewall-init |
52d89633 | 192 | Obsoletes: firewall-init-ipchains |
e51026eb | 193 | Obsoletes: iptables24-init |
022edc63 | 194 | %{?with_vserver:Provides: iptables-init = %{version}-%{release}} |
0e79507b PS |
195 | |
196 | %description init | |
197 | Iptables-init is meant to provide an alternate way than firewall-init | |
198 | to start and stop packet filtering through iptables(8). | |
199 | ||
30bd20eb JR |
200 | %description init -l pl.UTF-8 |
201 | Iptables-init ma na celu udostępnienie alternatywnego w stosunku do | |
202 | firewall-init sposobu włączania i wyłączania filtrów IP jądra poprzez | |
0e79507b PS |
203 | iptables(8). |
204 | ||
a540a457 JK |
205 | %package ebtables |
206 | Summary: Ethernet Bridge Tables - xtables compatibility wrapper | |
207 | Summary(pl.UTF-8): Ethernet Bridge Tables – nakładka kompatybilności na xtables | |
208 | Group: Networking/Admin | |
209 | Requires(post,preun): /sbin/chkconfig | |
210 | Requires(post,preun,postun): systemd-units >= 38 | |
b6fed45f | 211 | Requires: %{name} = %{version}-%{release} |
a540a457 JK |
212 | Requires: rc-scripts >= 0.4.3.0 |
213 | Requires: systemd-units >= 38 | |
214 | # do not 'provide' something this is not really compatible with | |
215 | #Provides: ebtables | |
b6fed45f JB |
216 | Conflicts: ebtables < 2.0.11 |
217 | %{?with_vserver:Provides: iptables-ebtables = %{version}-%{release}} | |
a540a457 JK |
218 | |
219 | %description ebtables | |
e026a282 JB |
220 | ebtables is a tool for managing Linux 2.5.x (and above) Link Layer |
221 | firewalling subsystem. | |
a540a457 | 222 | |
e026a282 JB |
223 | This package contains a compatibility wrapper over xtables providing |
224 | some functionality of the original ebtables tool. | |
a540a457 JK |
225 | |
226 | Note: this is not really a fully-compatible drop-in replacement! | |
227 | ||
e026a282 JB |
228 | %description ebtables -l pl.UTF-8 |
229 | ebtables to narzędzie do zarządzania podsystemem firewalla warstwy | |
230 | połączenia (Link Layer) Linuksa 2.5.x (i nowszych). | |
231 | ||
232 | Ten pakiet zawiera warstwę zgodności dla xtables zapewniającą część | |
233 | funkcjonalności oryginalnego narzędzia ebtables. | |
234 | ||
235 | Uwaga: nie jest to w pełni zgodny zamiennik! | |
236 | ||
0e79507b | 237 | %prep |
511b0491 | 238 | %setup -q -n iptables-%{version} -a1 |
65ffbe22 | 239 | %patch0 -p1 |
d973e24a | 240 | %if %{with batch} |
65ffbe22 | 241 | %patch1 -p1 |
93ad9851 | 242 | %endif |
4e86922f | 243 | %patch2 -p1 |
534f47dd | 244 | %patch3 -p1 |
d13a1305 | 245 | %patch4 -p1 |
a2f3cd63 | 246 | %patch5 -p1 |
e803115b | 247 | |
c0ae8513 JB |
248 | %{?with_ipt_IPV4OPTSSTRIP:%patch10 -p1} |
249 | %{?with_xt_layer7:%patch11 -p1} | |
250 | %{?with_ipt_rpc:%patch12 -p1} | |
efecc54e | 251 | %patch13 -p1 |
d973e24a | 252 | %if %{with vserver} |
52cee3e3 | 253 | %patch14 -p1 |
d973e24a | 254 | %patch15 -p1 |
dfc0441a | 255 | %endif |
16c27088 | 256 | %patch16 -p1 |
6c13dbc4 | 257 | |
0e79507b | 258 | %build |
78e5603d | 259 | %{__libtoolize} |
0a44bfb5 | 260 | %{__aclocal} -I m4 |
03ece50a | 261 | %{__autoconf} |
c0ae8513 | 262 | %{__autoheader} |
6dc7a739 | 263 | %{__automake} |
264 | %configure \ | |
b0abf64e | 265 | CFLAGS="%{rpmcflags} %{rpmcppflags} -D%{!?debug:N}DEBUG" \ |
c0ae8513 | 266 | %{?with_usekernelsrc:--with-kernel=%{_kernelsrcdir}} \ |
61d2127f | 267 | %{?with_pcap:--enable-bpf-compiler} \ |
6dc7a739 | 268 | --enable-libipq \ |
61d2127f | 269 | %{?with_pcap:--enable-nfsynproxy} \ |
1a1801c3 | 270 | %{!?with_nftables:--disable-nftables} \ |
a0c2c091 | 271 | %{?with_static:--enable-static} |
6dc7a739 | 272 | |
8b34696c | 273 | %{__make} -j1 all \ |
a0c2c091 | 274 | V=1 |
0e79507b | 275 | |
199610f3 | 276 | %if %{with doc} |
2958d7d0 | 277 | %{__make} -j1 -C iptables-howtos |
199610f3 PG |
278 | sed -i 's:$(HTML_HOWTOS)::g; s:$(PSUS_HOWTOS)::g' iptables-howtos/Makefile |
279 | %endif | |
0e79507b PS |
280 | |
281 | %install | |
282 | rm -rf $RPM_BUILD_ROOT | |
a94df067 | 283 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \ |
63a6c82f JR |
284 | $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_mandir}/man3} \ |
285 | $RPM_BUILD_ROOT%{systemdunitdir} | |
0e79507b | 286 | |
6dc7a739 | 287 | %{__make} install \ |
0e79507b PS |
288 | DESTDIR=$RPM_BUILD_ROOT \ |
289 | BINDIR=%{_sbindir} \ | |
290 | MANDIR=%{_mandir} \ | |
291 | LIBDIR=%{_libdir} | |
292 | ||
ab87c7d0 | 293 | # use ld script for -liptc backward compat (see no-libiptc.patch for source) |
7cf640e1 JB |
294 | %{__sed} \ |
295 | %ifarch %{x8664} alpha aarch64 hppa64 mips64 ppc64 s390x sparc64 | |
296 | -e 's,@BITS@,64,' \ | |
297 | %else | |
298 | -e 's,@BITS@,32,' \ | |
299 | %endif | |
19456050 | 300 | -e 's,@LIBDIR@,%{_libdir},g' \ |
7cf640e1 | 301 | -e "s,@ARCH@,$(echo "%{_build_arch}" | tr _ -)," libiptc/libiptc.ld.in >$RPM_BUILD_ROOT%{_libdir}/libiptc.so |
f9caff1e | 302 | |
705102f6 JB |
303 | install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/iptables |
304 | install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/ip6tables | |
c322322e | 305 | |
705102f6 JB |
306 | install -p %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/iptables-config |
307 | install -p %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/ip6tables-config | |
a94df067 | 308 | |
705102f6 JB |
309 | install -p %{SOURCE8} $RPM_BUILD_ROOT%{systemdunitdir}/iptables.service |
310 | install -p %{SOURCE9} $RPM_BUILD_ROOT%{systemdunitdir}/ip6tables.service | |
63a6c82f | 311 | |
a540a457 JK |
312 | # these won't work as they are now |
313 | #install -p %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/ebtables | |
314 | #install -p %{SOURCE11} $RPM_BUILD_ROOT/etc/sysconfig/ebtables-config | |
315 | #install -p %{SOURCE12} $RPM_BUILD_ROOT%{systemdunitdir}/ebtables.service | |
9ec3dc4d | 316 | |
0e79507b PS |
317 | %clean |
318 | rm -rf $RPM_BUILD_ROOT | |
319 | ||
a0c2c091 JB |
320 | %post libs -p /sbin/ldconfig |
321 | %postun libs -p /sbin/ldconfig | |
dfc0441a | 322 | |
0e79507b | 323 | %post init |
705102f6 JB |
324 | /sbin/chkconfig --add iptables |
325 | /sbin/chkconfig --add ip6tables | |
326 | %systemd_post iptables.service ip6tables.service | |
0e79507b PS |
327 | |
328 | %preun init | |
329 | if [ "$1" = "0" ]; then | |
705102f6 JB |
330 | /sbin/chkconfig --del iptables |
331 | /sbin/chkconfig --del ip6tables | |
0e79507b | 332 | fi |
705102f6 | 333 | %systemd_preun iptables.service ip6tables.service |
63a6c82f JR |
334 | |
335 | %postun init | |
336 | %systemd_reload | |
337 | ||
705102f6 JB |
338 | %triggerpostun init -- iptables-init < 1.4.13-2 |
339 | %systemd_trigger iptables.service ip6tables.service | |
0e79507b PS |
340 | |
341 | %files | |
342 | %defattr(644,root,root,755) | |
0e79507b | 343 | %{?with_doc:%doc iptables-howtos/{NAT,networking-concepts,packet-filtering}-HOWTO*} |
6dc7a739 | 344 | %attr(755,root,root) %{_bindir}/iptables-xml |
037d4c5e | 345 | %attr(755,root,root) %{_sbindir}/arptables |
afae2af1 AG |
346 | %attr(755,root,root) %{_sbindir}/arptables-nft |
347 | %attr(755,root,root) %{_sbindir}/arptables-nft-restore | |
348 | %attr(755,root,root) %{_sbindir}/arptables-nft-save | |
349 | %attr(755,root,root) %{_sbindir}/arptables-restore | |
350 | %attr(755,root,root) %{_sbindir}/arptables-save | |
c7a0fe01 | 351 | %attr(755,root,root) %{_sbindir}/ip6tables |
67c1b03a | 352 | %attr(755,root,root) %{_sbindir}/ip6tables-apply |
6461831b AM |
353 | %attr(755,root,root) %{_sbindir}/ip6tables-legacy |
354 | %attr(755,root,root) %{_sbindir}/ip6tables-legacy-restore | |
355 | %attr(755,root,root) %{_sbindir}/ip6tables-legacy-save | |
c7a0fe01 ER |
356 | %attr(755,root,root) %{_sbindir}/ip6tables-restore |
357 | %attr(755,root,root) %{_sbindir}/ip6tables-save | |
6461831b | 358 | %attr(755,root,root) %{_sbindir}/iptables |
4a54d3f7 | 359 | %attr(755,root,root) %{_sbindir}/iptables-apply |
6461831b AM |
360 | %attr(755,root,root) %{_sbindir}/iptables-legacy |
361 | %attr(755,root,root) %{_sbindir}/iptables-legacy-restore | |
362 | %attr(755,root,root) %{_sbindir}/iptables-legacy-save | |
363 | %attr(755,root,root) %{_sbindir}/iptables-restore | |
364 | %attr(755,root,root) %{_sbindir}/iptables-save | |
365 | %attr(755,root,root) %{_sbindir}/xtables-legacy-multi | |
dfc0441a AM |
366 | %if %{with batch} |
367 | %attr(755,root,root) %{_sbindir}/iptables-batch | |
368 | %attr(755,root,root) %{_sbindir}/ip6tables-batch | |
369 | %endif | |
d67a1056 | 370 | %attr(755,root,root) %{_sbindir}/nfnl_osf |
61d2127f JB |
371 | %if %{with pcap} |
372 | %attr(755,root,root) %{_sbindir}/nfbpf_compile | |
373 | %attr(755,root,root) %{_sbindir}/nfsynproxy | |
374 | %endif | |
1a1801c3 | 375 | %if %{with nftables} |
6461831b AM |
376 | %attr(755,root,root) %{_sbindir}/ip6tables-nft |
377 | %attr(755,root,root) %{_sbindir}/ip6tables-nft-restore | |
378 | %attr(755,root,root) %{_sbindir}/ip6tables-nft-save | |
379 | %attr(755,root,root) %{_sbindir}/iptables-nft | |
380 | %attr(755,root,root) %{_sbindir}/iptables-nft-restore | |
381 | %attr(755,root,root) %{_sbindir}/iptables-nft-save | |
382 | %attr(755,root,root) %{_sbindir}/xtables-monitor | |
383 | %attr(755,root,root) %{_sbindir}/xtables-nft-multi | |
1a1801c3 JB |
384 | %attr(755,root,root) %{_sbindir}/iptables-restore-translate |
385 | %attr(755,root,root) %{_sbindir}/iptables-translate | |
1a1801c3 JB |
386 | %attr(755,root,root) %{_sbindir}/ip6tables-restore-translate |
387 | %attr(755,root,root) %{_sbindir}/ip6tables-translate | |
6461831b | 388 | %attr(755,root,root) %{_libdir}/xtables/libarpt_mangle.so |
6461831b AM |
389 | %attr(755,root,root) %{_libdir}/xtables/libebt_mark.so |
390 | %attr(755,root,root) %{_libdir}/xtables/libebt_nflog.so | |
1a1801c3 | 391 | %endif |
d67a1056 | 392 | %{_datadir}/xtables |
a0c2c091 | 393 | %dir %{_libdir}/xtables |
037d4c5e | 394 | %attr(755,root,root) %{_libdir}/xtables/libebt_802_3.so |
ab87c7d0 | 395 | %attr(755,root,root) %{_libdir}/xtables/libebt_among.so |
6461831b | 396 | %attr(755,root,root) %{_libdir}/xtables/libebt_arp.so |
54750b58 | 397 | %attr(755,root,root) %{_libdir}/xtables/libebt_arpreply.so |
6461831b AM |
398 | %attr(755,root,root) %{_libdir}/xtables/libebt_dnat.so |
399 | %attr(755,root,root) %{_libdir}/xtables/libebt_ip6.so | |
037d4c5e | 400 | %attr(755,root,root) %{_libdir}/xtables/libebt_ip.so |
037d4c5e | 401 | %attr(755,root,root) %{_libdir}/xtables/libebt_log.so |
037d4c5e | 402 | %attr(755,root,root) %{_libdir}/xtables/libebt_mark_m.so |
6461831b AM |
403 | %attr(755,root,root) %{_libdir}/xtables/libebt_pkttype.so |
404 | %attr(755,root,root) %{_libdir}/xtables/libebt_redirect.so | |
405 | %attr(755,root,root) %{_libdir}/xtables/libebt_snat.so | |
406 | %attr(755,root,root) %{_libdir}/xtables/libebt_stp.so | |
407 | %attr(755,root,root) %{_libdir}/xtables/libebt_vlan.so | |
a0c2c091 JB |
408 | %attr(755,root,root) %{_libdir}/xtables/libip6t_HL.so |
409 | %attr(755,root,root) %{_libdir}/xtables/libip6t_LOG.so | |
410 | %attr(755,root,root) %{_libdir}/xtables/libip6t_REJECT.so | |
6dc7a739 | 411 | %attr(755,root,root) %{_libdir}/xtables/libip6t_ah.so |
412 | %attr(755,root,root) %{_libdir}/xtables/libip6t_dst.so | |
413 | %attr(755,root,root) %{_libdir}/xtables/libip6t_eui64.so | |
414 | %attr(755,root,root) %{_libdir}/xtables/libip6t_frag.so | |
415 | %attr(755,root,root) %{_libdir}/xtables/libip6t_hbh.so | |
416 | %attr(755,root,root) %{_libdir}/xtables/libip6t_hl.so | |
6dc7a739 | 417 | %attr(755,root,root) %{_libdir}/xtables/libip6t_icmp6.so |
6dc7a739 | 418 | %attr(755,root,root) %{_libdir}/xtables/libip6t_ipv6header.so |
6dc7a739 | 419 | %attr(755,root,root) %{_libdir}/xtables/libip6t_mh.so |
6dc7a739 | 420 | %attr(755,root,root) %{_libdir}/xtables/libip6t_rt.so |
6dc7a739 | 421 | %attr(755,root,root) %{_libdir}/xtables/libipt_CLUSTERIP.so |
422 | %attr(755,root,root) %{_libdir}/xtables/libipt_DNAT.so | |
6dc7a739 | 423 | %attr(755,root,root) %{_libdir}/xtables/libipt_ECN.so |
6dc7a739 | 424 | %attr(755,root,root) %{_libdir}/xtables/libipt_LOG.so |
425 | %attr(755,root,root) %{_libdir}/xtables/libipt_MASQUERADE.so | |
6dc7a739 | 426 | %attr(755,root,root) %{_libdir}/xtables/libipt_NETMAP.so |
6dc7a739 | 427 | %attr(755,root,root) %{_libdir}/xtables/libipt_REDIRECT.so |
428 | %attr(755,root,root) %{_libdir}/xtables/libipt_REJECT.so | |
6dc7a739 | 429 | %attr(755,root,root) %{_libdir}/xtables/libipt_SNAT.so |
6dc7a739 | 430 | %attr(755,root,root) %{_libdir}/xtables/libipt_TTL.so |
431 | %attr(755,root,root) %{_libdir}/xtables/libipt_ULOG.so | |
a0c2c091 | 432 | %attr(755,root,root) %{_libdir}/xtables/libipt_ah.so |
a0c2c091 | 433 | %attr(755,root,root) %{_libdir}/xtables/libipt_icmp.so |
a0c2c091 | 434 | %attr(755,root,root) %{_libdir}/xtables/libipt_realm.so |
a0c2c091 | 435 | %attr(755,root,root) %{_libdir}/xtables/libipt_ttl.so |
df84948a AM |
436 | %attr(755,root,root) %{_libdir}/xtables/libip6t_DNAT.so |
437 | %attr(755,root,root) %{_libdir}/xtables/libip6t_DNPT.so | |
438 | %attr(755,root,root) %{_libdir}/xtables/libip6t_MASQUERADE.so | |
439 | %attr(755,root,root) %{_libdir}/xtables/libip6t_NETMAP.so | |
440 | %attr(755,root,root) %{_libdir}/xtables/libip6t_REDIRECT.so | |
441 | %attr(755,root,root) %{_libdir}/xtables/libip6t_SNAT.so | |
442 | %attr(755,root,root) %{_libdir}/xtables/libip6t_SNPT.so | |
ae8403cd | 443 | %attr(755,root,root) %{_libdir}/xtables/libip6t_srh.so |
9b1e8e39 | 444 | %attr(755,root,root) %{_libdir}/xtables/libxt_AUDIT.so |
0a44bfb5 | 445 | %attr(755,root,root) %{_libdir}/xtables/libxt_CHECKSUM.so |
6dc7a739 | 446 | %attr(755,root,root) %{_libdir}/xtables/libxt_CLASSIFY.so |
a0c2c091 JB |
447 | %attr(755,root,root) %{_libdir}/xtables/libxt_CONNMARK.so |
448 | %attr(755,root,root) %{_libdir}/xtables/libxt_CONNSECMARK.so | |
449 | %attr(755,root,root) %{_libdir}/xtables/libxt_CT.so | |
450 | %attr(755,root,root) %{_libdir}/xtables/libxt_DSCP.so | |
2c2ecb60 | 451 | %attr(755,root,root) %{_libdir}/xtables/libxt_HMARK.so |
a0c2c091 JB |
452 | %attr(755,root,root) %{_libdir}/xtables/libxt_IDLETIMER.so |
453 | %attr(755,root,root) %{_libdir}/xtables/libxt_IMQ.so | |
454 | %attr(755,root,root) %{_libdir}/xtables/libxt_LED.so | |
455 | %attr(755,root,root) %{_libdir}/xtables/libxt_MARK.so | |
456 | %attr(755,root,root) %{_libdir}/xtables/libxt_NFLOG.so | |
457 | %attr(755,root,root) %{_libdir}/xtables/libxt_NFQUEUE.so | |
458 | %attr(755,root,root) %{_libdir}/xtables/libxt_NOTRACK.so | |
459 | %attr(755,root,root) %{_libdir}/xtables/libxt_RATEEST.so | |
460 | %attr(755,root,root) %{_libdir}/xtables/libxt_SECMARK.so | |
461 | %attr(755,root,root) %{_libdir}/xtables/libxt_SET.so | |
61d2127f | 462 | %attr(755,root,root) %{_libdir}/xtables/libxt_SYNPROXY.so |
a0c2c091 JB |
463 | %attr(755,root,root) %{_libdir}/xtables/libxt_TCPMSS.so |
464 | %attr(755,root,root) %{_libdir}/xtables/libxt_TCPOPTSTRIP.so | |
465 | %attr(755,root,root) %{_libdir}/xtables/libxt_TEE.so | |
466 | %attr(755,root,root) %{_libdir}/xtables/libxt_TOS.so | |
467 | %attr(755,root,root) %{_libdir}/xtables/libxt_TPROXY.so | |
468 | %attr(755,root,root) %{_libdir}/xtables/libxt_TRACE.so | |
f5742d8d | 469 | %attr(755,root,root) %{_libdir}/xtables/libxt_addrtype.so |
488dc05d | 470 | %attr(755,root,root) %{_libdir}/xtables/libxt_bpf.so |
037d4c5e | 471 | %attr(755,root,root) %{_libdir}/xtables/libxt_cgroup.so |
ab1d9cfc | 472 | %attr(755,root,root) %{_libdir}/xtables/libxt_cluster.so |
6dc7a739 | 473 | %attr(755,root,root) %{_libdir}/xtables/libxt_comment.so |
474 | %attr(755,root,root) %{_libdir}/xtables/libxt_connbytes.so | |
488dc05d | 475 | %attr(755,root,root) %{_libdir}/xtables/libxt_connlabel.so |
6dc7a739 | 476 | %attr(755,root,root) %{_libdir}/xtables/libxt_connlimit.so |
477 | %attr(755,root,root) %{_libdir}/xtables/libxt_connmark.so | |
6dc7a739 | 478 | %attr(755,root,root) %{_libdir}/xtables/libxt_conntrack.so |
0a44bfb5 | 479 | %attr(755,root,root) %{_libdir}/xtables/libxt_cpu.so |
6dc7a739 | 480 | %attr(755,root,root) %{_libdir}/xtables/libxt_dccp.so |
9b1e8e39 | 481 | %attr(755,root,root) %{_libdir}/xtables/libxt_devgroup.so |
6dc7a739 | 482 | %attr(755,root,root) %{_libdir}/xtables/libxt_dscp.so |
f5742d8d | 483 | %attr(755,root,root) %{_libdir}/xtables/libxt_ecn.so |
6dc7a739 | 484 | %attr(755,root,root) %{_libdir}/xtables/libxt_esp.so |
485 | %attr(755,root,root) %{_libdir}/xtables/libxt_hashlimit.so | |
486 | %attr(755,root,root) %{_libdir}/xtables/libxt_helper.so | |
037d4c5e | 487 | %attr(755,root,root) %{_libdir}/xtables/libxt_ipcomp.so |
6dc7a739 | 488 | %attr(755,root,root) %{_libdir}/xtables/libxt_iprange.so |
0a44bfb5 | 489 | %attr(755,root,root) %{_libdir}/xtables/libxt_ipvs.so |
6dc7a739 | 490 | %attr(755,root,root) %{_libdir}/xtables/libxt_length.so |
491 | %attr(755,root,root) %{_libdir}/xtables/libxt_limit.so | |
492 | %attr(755,root,root) %{_libdir}/xtables/libxt_mac.so | |
493 | %attr(755,root,root) %{_libdir}/xtables/libxt_mark.so | |
6dc7a739 | 494 | %attr(755,root,root) %{_libdir}/xtables/libxt_multiport.so |
f5742d8d | 495 | %attr(755,root,root) %{_libdir}/xtables/libxt_nfacct.so |
d67a1056 | 496 | %attr(755,root,root) %{_libdir}/xtables/libxt_osf.so |
a0c2c091 | 497 | %attr(755,root,root) %{_libdir}/xtables/libxt_owner.so |
6dc7a739 | 498 | %attr(755,root,root) %{_libdir}/xtables/libxt_physdev.so |
499 | %attr(755,root,root) %{_libdir}/xtables/libxt_pkttype.so | |
ab1d9cfc | 500 | %attr(755,root,root) %{_libdir}/xtables/libxt_policy.so |
6dc7a739 | 501 | %attr(755,root,root) %{_libdir}/xtables/libxt_quota.so |
75dcc0ed | 502 | %attr(755,root,root) %{_libdir}/xtables/libxt_rateest.so |
a0c2c091 | 503 | %attr(755,root,root) %{_libdir}/xtables/libxt_recent.so |
f5742d8d | 504 | %attr(755,root,root) %{_libdir}/xtables/libxt_rpfilter.so |
6dc7a739 | 505 | %attr(755,root,root) %{_libdir}/xtables/libxt_sctp.so |
ec60ce35 | 506 | %attr(755,root,root) %{_libdir}/xtables/libxt_set.so |
6dc7a739 | 507 | %attr(755,root,root) %{_libdir}/xtables/libxt_socket.so |
508 | %attr(755,root,root) %{_libdir}/xtables/libxt_standard.so | |
509 | %attr(755,root,root) %{_libdir}/xtables/libxt_state.so | |
510 | %attr(755,root,root) %{_libdir}/xtables/libxt_statistic.so | |
511 | %attr(755,root,root) %{_libdir}/xtables/libxt_string.so | |
6dc7a739 | 512 | %attr(755,root,root) %{_libdir}/xtables/libxt_tcp.so |
a0c2c091 | 513 | %attr(755,root,root) %{_libdir}/xtables/libxt_tcpmss.so |
6dc7a739 | 514 | %attr(755,root,root) %{_libdir}/xtables/libxt_time.so |
515 | %attr(755,root,root) %{_libdir}/xtables/libxt_tos.so | |
6dc7a739 | 516 | %attr(755,root,root) %{_libdir}/xtables/libxt_u32.so |
517 | %attr(755,root,root) %{_libdir}/xtables/libxt_udp.so | |
c0ae8513 JB |
518 | %{?with_ipt_IPV4OPTSSTRIP:%attr(755,root,root) %{_libdir}/xtables/libipt_IPV4OPTSSTRIP.so} |
519 | %{?with_ipt_rpc:%attr(755,root,root) %{_libdir}/xtables/libipt_rpc.so} | |
520 | %{?with_xt_layer7:%attr(755,root,root) %{_libdir}/xtables/libxt_layer7.so} | |
6461831b | 521 | %{?with_nftables:%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ethertypes} |
b4dea9ed | 522 | %{_mandir}/man1/iptables-xml.1* |
a0c2c091 | 523 | %{_mandir}/man8/ip6tables.8* |
67c1b03a | 524 | %{_mandir}/man8/ip6tables-apply.8* |
a0c2c091 JB |
525 | %{_mandir}/man8/ip6tables-restore.8* |
526 | %{_mandir}/man8/ip6tables-save.8* | |
527 | %{_mandir}/man8/iptables.8* | |
67c1b03a | 528 | %{_mandir}/man8/iptables-apply.8* |
f59ad890 | 529 | %{_mandir}/man8/iptables-extensions.8* |
a0c2c091 JB |
530 | %{_mandir}/man8/iptables-restore.8* |
531 | %{_mandir}/man8/iptables-save.8* | |
ae8403cd | 532 | %{_mandir}/man8/nfnl_osf.8* |
6461831b AM |
533 | %{_mandir}/man8/xtables-legacy.8* |
534 | %{_mandir}/man8/xtables-monitor.8* | |
60b0efb2 JB |
535 | %if %{with nftables} |
536 | %{_mandir}/man8/arptables-nft.8* | |
537 | %{_mandir}/man8/arptables-nft-restore.8* | |
538 | %{_mandir}/man8/arptables-nft-save.8* | |
539 | %{_mandir}/man8/ebtables-nft.8* | |
ab87c7d0 | 540 | %{_mandir}/man8/ip6tables-restore-translate.8* |
60b0efb2 | 541 | %{_mandir}/man8/ip6tables-translate.8* |
ab87c7d0 | 542 | %{_mandir}/man8/iptables-restore-translate.8* |
60b0efb2 | 543 | %{_mandir}/man8/iptables-translate.8* |
6461831b AM |
544 | %{_mandir}/man8/xtables-nft.8* |
545 | %{_mandir}/man8/xtables-translate.8* | |
60b0efb2 JB |
546 | %endif |
547 | %if %{with pcap} | |
548 | %{_mandir}/man8/nfbpf_compile.8* | |
549 | %endif | |
0e79507b | 550 | |
dfc0441a AM |
551 | %files libs |
552 | %defattr(644,root,root,755) | |
a0c2c091 | 553 | %attr(755,root,root) %{_libdir}/libip4tc.so.*.*.* |
60b0efb2 | 554 | %attr(755,root,root) %ghost %{_libdir}/libip4tc.so.2 |
a0c2c091 | 555 | %attr(755,root,root) %{_libdir}/libip6tc.so.*.*.* |
60b0efb2 | 556 | %attr(755,root,root) %ghost %{_libdir}/libip6tc.so.2 |
a0c2c091 JB |
557 | %attr(755,root,root) %{_libdir}/libipq.so.*.*.* |
558 | %attr(755,root,root) %ghost %{_libdir}/libipq.so.0 | |
a0c2c091 | 559 | %attr(755,root,root) %{_libdir}/libxtables.so.*.*.* |
1a1801c3 | 560 | %attr(755,root,root) %ghost %{_libdir}/libxtables.so.12 |
dfc0441a | 561 | |
0e79507b PS |
562 | %files devel |
563 | %defattr(644,root,root,755) | |
564 | %{?with_doc:%doc iptables-howtos/netfilter-hacking-HOWTO*} | |
a0c2c091 JB |
565 | %attr(755,root,root) %{_libdir}/libip4tc.so |
566 | %attr(755,root,root) %{_libdir}/libip6tc.so | |
567 | %attr(755,root,root) %{_libdir}/libipq.so | |
f9caff1e | 568 | %attr(755,root,root) %{_libdir}/libiptc.so |
a0c2c091 JB |
569 | %attr(755,root,root) %{_libdir}/libxtables.so |
570 | %{_libdir}/libip4tc.la | |
571 | %{_libdir}/libip6tc.la | |
572 | %{_libdir}/libipq.la | |
a0c2c091 JB |
573 | %{_libdir}/libxtables.la |
574 | %{_includedir}/libipq.h | |
575 | %{_includedir}/xtables.h | |
f59ad890 | 576 | %{_includedir}/xtables-version.h |
dfc0441a | 577 | %{_includedir}/libiptc |
e803115b AM |
578 | %{_pkgconfigdir}/libip4tc.pc |
579 | %{_pkgconfigdir}/libip6tc.pc | |
9a5acd07 | 580 | %{_pkgconfigdir}/libipq.pc |
a0c2c091 JB |
581 | %{_pkgconfigdir}/libiptc.pc |
582 | %{_pkgconfigdir}/xtables.pc | |
583 | %{_mandir}/man3/ipq_*.3* | |
584 | %{_mandir}/man3/libipq.3* | |
0e79507b | 585 | |
d67a1056 | 586 | %if %{with static} |
dfc0441a AM |
587 | %files static |
588 | %defattr(644,root,root,755) | |
a0c2c091 JB |
589 | %{_libdir}/libip4tc.a |
590 | %{_libdir}/libip6tc.a | |
591 | %{_libdir}/libipq.a | |
a0c2c091 | 592 | %{_libdir}/libxtables.a |
d67a1056 | 593 | %endif |
dfc0441a | 594 | |
0e79507b PS |
595 | %files init |
596 | %defattr(644,root,root,755) | |
705102f6 JB |
597 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/iptables-config |
598 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ip6tables-config | |
c7a0fe01 ER |
599 | %attr(754,root,root) /etc/rc.d/init.d/iptables |
600 | %attr(754,root,root) /etc/rc.d/init.d/ip6tables | |
705102f6 JB |
601 | %{systemdunitdir}/iptables.service |
602 | %{systemdunitdir}/ip6tables.service | |
a540a457 JK |
603 | |
604 | %files ebtables | |
605 | %defattr(644,root,root,755) | |
606 | %attr(755,root,root) %{_sbindir}/ebtables | |
afae2af1 AG |
607 | %attr(755,root,root) %{_sbindir}/ebtables-nft |
608 | %attr(755,root,root) %{_sbindir}/ebtables-nft-restore | |
609 | %attr(755,root,root) %{_sbindir}/ebtables-nft-save | |
610 | %attr(755,root,root) %{_sbindir}/ebtables-restore | |
611 | %attr(755,root,root) %{_sbindir}/ebtables-save |