Comments (12)
@tigerjibo
Sorry, i don't know more about transparent proxy.
All i know is that as @alonbg says, this link shows how to configure transparent proxy, it must use iptables
, and ipfw
in F-Stack can do the same thing.
from f-stack.
@whl739 :
Thanks for your reply as soon as possible. I will modify ipfw and ipfil as to support the transparent proxy.
from f-stack.
We didn't test transparent proxy with nginx.
But as i know, IP_TRANSPARENT
is not supported by FreeBSD stack and IP_BINDANY
is supported.
Since the configure
checks for these options on Linux, it couldn't detective the real supported options on F-Stack.
Maybe i should modify auto/unix
to support IP_BINDANY
.
from f-stack.
@whl739 thank you. I believe you are correct, IP_BINDANY
is the FreeBSD equiv to Linux's IP_TRANSPARENT
. This nginx feature (i.e. NGX_HAVE_TRANSPARENT_PROXY
) is not enabled by default in auto/unix
. I don't think it should be as it requires additional system setup in Linux and maybe on FreeBSD to properly function.
from f-stack.
@whl739 , considering configure
would be modified somehow to detect IP_BINDANY
option ...
Can you asses please what additional configuration, tools, functionality is missing for this to work ?
from f-stack.
A simple way:
diff --git a/app/nginx-1.11.10/auto/unix b/app/nginx-1.11.10/auto/unix
index 2354d29..0666770 100644
--- a/app/nginx-1.11.10/auto/unix
+++ b/app/nginx-1.11.10/auto/unix
@@ -365,7 +365,7 @@ ngx_feature_incs="#include <sys/socket.h>
ngx_feature_path=
ngx_feature_libs=
ngx_feature_test="setsockopt(0, IPPROTO_IP, IP_TRANSPARENT, NULL, 0)"
-. auto/feature
+#. auto/feature
# FreeBSD bind to any address for transparent proxying
@@ -377,7 +377,8 @@ ngx_feature_incs="#include <sys/socket.h>
#include <netinet/in.h>"
ngx_feature_path=
ngx_feature_libs=
-ngx_feature_test="setsockopt(0, IPPROTO_IP, IP_BINDANY, NULL, 0)"
+#ngx_feature_test="setsockopt(0, IPPROTO_IP, IP_BINDANY, NULL, 0)"
+ngx_feature_test="int a;"
. auto/feature
from f-stack.
@whl739 thank you. Additionally, for this socket option to work, the FreeBSD stack should support iptables.
I assume this is not supported yet ...
from f-stack.
We have already supported ipfw
. It is similar with iptables
in Linux.
from f-stack.
Hi whl739:
How to use the ipfw tool to support the transparent proxy for the tcp or udp protocol?
from f-stack.
Hi, @tigerjibo
As mentioned you have modified the ipfw to support transparent proxy, does it work now?
Thanks in advance.
from f-stack.
from f-stack.
Hi @tigerjibo I want to use nginx transparent proxy, but while test, I got a setsockopt(IP_BINDANY) error using the f-stack, could you send me the patch you modified?
Thank you very much.
My email address is [email protected]
Best Regards!
from f-stack.
Related Issues (20)
- IPv6 address not pingable HOT 1
- DPDK: unable to ping DPDK-kni-captured NIC port HOT 2
- Cannot ping config.ini ip after run helloword HOT 2
- Unable to establish communication with the assigned IP HOT 3
- SCTP support
- [Security] Buffer overflow in freebsd/contrib/openzfs/module/lua/ldo.c
- How to config bonding mode?
- F-Stack multiple process howto
- How to set a specified IPv6 address to ff_bind() without error?
- Does F-stack support ENA on AWS? HOT 2
- helloworld_epoll --conf ../config.ini --proc-type=primary --proc-id=0 fail to bind port1 192.168.1.3 HOT 1
- Failed to launch multiple nginx workers using vmxnet3 driver HOT 1
- F-Stack Redis does not seems to listen on port 6379
- 如何配置修改freeBSD HOT 1
- Specifying devargs parameter?
- ff_rss_check for IPv6
- Unable to compile f-stack lib on fedora HOT 1
- Https Client HOT 3
- 压测nginx cpu亲和不起作用
- 反向代理连接服务端时获取的端口限制在10000到65535之间问题 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from f-stack.