ipv4

firewalld 指定IP访问某端口

匿名 (未验证) 提交于 2019-12-02 21:53:52
systemctl start firewalld.service (以下红色字体需要根据实际情况修改) (1) Postgresql端口设置。允许192.168.142.166访问5432端口 firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="192.168.142.166" port protocol="tcp" port="5432" accept" (2)redis端口设置。允许192.168.142.166访问6379端口 firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="192.168.142.166" port protocol="tcp" port="6379" accept" (3)beanstalkd端口设置。允许192.168.142.166访问11300端口 firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="192.168.142.166" port protocol="tcp" port="11300" accept" systemctl

java.net.NoRouteToHostException: Cannot assign requested address 问题分析

匿名 (未验证) 提交于 2019-12-02 21:53:32
问题: cat /proc/sys/net/ipv4/ip_local_port_range 32768 - 61000 解决方法: 1. 调低端口释放后的等待时间,默认为60s,修改为15~30s。 echo 30 > /proc/sys/net/ipv4/tcp_fin_timeout /proc/sys/net/ipv4/tcp_tw_reuse ,默认为0,修改为1,释放 TIME_WAIT echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse 3. 修改 ctp/ip 协议配置,快速回收socket资源,默认为0.修改为1。 echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle https://blog.csdn.net/weixin_43757847/article/details/88188091 https://my.oschina.net/shichangcheng/blog/1560864 https://stackoverflow.com/questions/32282112/error-setting-net-ipv4-tcp-tw-reuse-net-ipv4-tcp-tw-recycle-in-sysctl-conf 伟程君帮忙找的 来源:博客园 作者: 凯宾斯基 链接:https://www

苹果审核ipv6海外解决思路-About APP Store

丶灬走出姿态 提交于 2019-12-02 21:41:09
原始简书文章地址 (也是我自己的) 首先声明,一我不负责涉及你们内部服务器. 二是好好读文章,别人能过,你们也能过 苹果6月1日出的 IPV6 协议阻碍了国内大多数积极开发者,我司也不外乎,经过三次被拒后,遂在网上查找关于 IPV6 审核的相关事宜,怪我年少无知以为这种开源协议的东西应该是免费的,当然,我说的免费是想着看几篇成熟的 IPV6 审核文章然后自己实践,奈何几乎所有关于苹果 IPV6 审核的文章到最后不是推荐买教育网转发要不就是直接把钱交给个人然后让第三方来协助通过. 我实在无法想象一个仅仅靠着linux服务器外加nginx转发就能赚大钱的畸形小社会是怎样形成的,linux市值多少钱恐怕无人能说出. 所有文章内说的苹果 IPV6 和后台服务器没关系是错误的,至少在请求转发层面是错误的.苹果使用 IPV6-ONLY 网络进行APP测试,如果服务器端支持 IPV6 的话则可以直接请求 IPV6 所对应的服务器进而使用nginx转发至相应的API接口.如果没有 IPV6 地址的话则直接通过NAT64转化为相应的IPV4进行请求相应API. 请注意这里的重点是这个 IPV6 ,,服务器不能单单支持 IPV6 即可,所谓的支持不能仅仅是打开linux服务器内相应被封印的 IPV6 相关设置然后加一个 HE 隧道(当然这么着也有通过的,但是 HE 也是基于 IPV4

Firewalld防火墙

眉间皱痕 提交于 2019-12-02 19:40:50
物理服务器安全 硬件层面: ab电源 机柜上锁 温度 ...... 系统层面: 远程登录(限制root/调整端口) 权限 sudo 弱口令 网络层面: 所有内网主机没有公网IP 端口限制( 22 80 443 ) DDOS--> 高防设备 web层面: http->https 防爬虫 防盗链 waf (nginx+lua) 云主机服务器安全 硬件层面: 无需考虑---> kvm虚拟化 系统层面: 云盾 安骑士 ---> 云安全中心(收费) SSH 网络层面: 安全组(firewalld|iptables) 云防火墙集中管理公网的策略 服务层面: nginx mysql redis --->弱口令 web层面: HTTPS 高防IP WAF防火墙 数据层面: 数据备份与恢复演练 想说的话 写下来--->进行增删改查---------------------------------------------------------------- 2.硬件架构、云架构等安全如何实现? 3.Firewalld防火墙基本概述? 4.Firewalld防火墙区域管理? eth0 eth0 --> A eth0 --> A eth1 --> B [root@oldboy-m01 ~]# firewall-cmd --get-default-zone #当前默认的区域 public [root

What is the total amount of public IPv4 addresses?

…衆ロ難τιáo~ 提交于 2019-12-02 18:43:32
Yes, I am needing to know what the total number possible IPs in the public IPv4 space. I'm not sure where to even get a neat list of all the IP address ranges, so could someone point me to a resource to calculate this myself or calculate the total number of IPs for me? Also, by Public IPs I mean not counting reserved or private-range IP addresses.. Only the ones that can be access through the internet. Marko According to Reserved IP addresses there are 588,514,304 reserved addresses and since there are 4,294,967,296 (2^32) IPv4 addressess in total, there are 3,706,452,992 public addresses. And

使用Docker报的错误 docker WARNING: IPv4 forwarding is disabled. Networking will not work

天大地大妈咪最大 提交于 2019-12-02 18:27:50
创建docker mysql的时候报错: [root@docker ~]# docker run -di --name pinyougou_mysql -p 33306:3306 -e MYSQL_ROOT_PASSWORD=123456 mysql WARNING: IPv4 forwarding is disabled. Networking will not work 搜百度IPv4 forwarding is disabled. Networking will not work找到下面方法: 解决办法: # vi /etc/sysctl.conf 或者 # vi /usr/lib/sysctl.d/00-system.conf 添加如下代码: net.ipv4.ip_forward=1 重启network服务 # systemctl restart network 查看是否修改成功 # sysctl net.ipv4.ip_forward 如果返回为“net.ipv4.ip_forward = 1”则表示成功了 原文链接: ———————————————— 版权声明:本文为CSDN博主「随小风」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/sfdst/article

Geolocation with IPv6?

依然范特西╮ 提交于 2019-12-02 17:36:16
I'm working on an IP geolocation library that uses the first three octets of an IPv4 address to determine a user's country, city, lat, lon, etc. Works like a charm. But it doesn't handle IPv6 addresses, and I'd like it to do so. Is there any way to transform an IPv6 address to get the equivalent of the first three octets of an IPv4 address, or are they on an entirely different numbering scheme, requiring a completely different ipgeo mapping? The typical IPv6 allocation is a /32 (four octets) to an Internet provider (which can be a multinational company), then /48 (six octets) to an end site

Why request.getRemoteAddr() returns ipv4 or ipv6 depending on context (post query or ajax query)

折月煮酒 提交于 2019-12-02 16:19:11
I've donne a web app with Spring/GWT that uses Flash to upload files. When I send an ajax request with GWT and try to get the user ip address, I get an ipv4 address like: 127.0.0.1 but when I upload my files with flash (and so a post request on the same webapp) I get an ipv6 address 0:0:0:0:0:0:0:1 I use the same code to get the user ip which is: ServletRequestAttributes att = (ServletRequestAttributes) RequestContextHolder.currentRequestAttributes(); att.getRequest().getRemoteAddr(); The problem is that I use a signature which uses the ip address to be sure that user can upload files (due to

Converting C++ TCP/IP applications from IPv4 to IPv6. Difficult? Worth the trouble?

不打扰是莪最后的温柔 提交于 2019-12-02 15:55:21
Over the years I've developed a small mass of C++ server/client applications for Windows using WinSock (Routers, Web/Mail/FTP Servers, etc... etc...). I’m starting to think more and more of creating an IPv6 version of these applications (While maintaining the original IPv4 version as well, of course). Questions: What pitfalls might I run into? Is the porting/conversion difficult? Is the conversion worth it? For a reference (or for fun), you can sneek a peak of the IPv4 code at the core of my applications. Einstein getaddrinfo and getnameinfo are your friends.. As much as possible I suggest

基于Linux的网络管理

不打扰是莪最后的温柔 提交于 2019-12-02 12:45:06
一、关于ip 在实验中使用的是ipv4,2进制32位 子网掩码255对应ip的网络位 子网掩码0对应ip的主机位 172.25.0.10/255.255.255.0为例 172.25.0代表网络位 10代表主机位。 172.25.0.10/255.255.255.0等价于172.25.0.10/24 二、配置ip 1、图形界面 可选择自动获取也可以选择静态地址。 2、文本化图形----nmtui 选择以太网 当选择静态地址时。 点击show配置地址。 三、网络设定工具 1、ping ping用于检测网络是否通畅 ping -c 1####ping1次 ping -w 1####等待1秒 ping -c1 -w1####ping1次等待1秒 2、ifconfig ifconf device ip/24 #设定ip ifconf device down #关闭 ifconf device up #开启 3、ip addr ip addr show #检测 ip addr add ip/24 dev device#添加ip ip addr del dev device ip/24 #删除ip ip addr flush device #刷新 以上修改均为临时修改,重启网络后失效。 四、管理网络配置文件 配置目录/etc/sysconfig/network-scripts/ 1