linux测试ipv6

简介: linux测试ipv6

前言

  • 操作系统版本:centos 7.6
  • curl版本:7.87(centos 7自带的curl版本是7.29,测ipv6会有问题

系统开启ipv6

centos 7默认开启 ipv6,可检查net.ipv6.conf.all.disable_ipv6net.ipv6.conf.default.disable_ipv6的值是否为 0。如果不是,可修改/etc/sysctl.conf文件。

sysctl -a | grep net.ipv6.conf.all.disable_ipv6
sysctl -a | grep net.ipv6.conf.default.disable_ipv6

执行 ip aifconfig 可查看网卡的ipv6地址,假设网卡名为 ens192

ifconfig ens192 | grep inet6 | awk '{print $2}'

更新curl

如果操作系统版本为CentOS 7,其自带的curl版本 7.29较低,建议更新curl,高版本curl可略过。

  1. 从github下载新版的curl,centos 7测试7.87版本可用。GitHub - curl - release
  2. 备份原来的curl
mv /usr/bin/curl{,-bak}
  1. 将新版的curl文件放到/usr/bin目录下,授予可执行权限
  2. 测试
curl -V

测试ipv6

# ping测试,-I 指定网卡名
ping6 -c 4 -I ens192 fe80::1c33:4e53:ebfc:707f
# telnet测试,测试80端口,百分号后接网卡名
telnet -6 fe80::20c:29ff:fead:6a6b%ens192 80
# curl测试,-6表示指定IPv6,-g 解析中括号,--interface 指定网卡名
curl -6 -g --interface ens192 "http://[fe80::20c:29ff:fead:6a6b]:80"

nginx配置监听ipv6地址

server {
    listen 80;
    listen [::]:80;
  # ...
}
相关文章
|
2月前
|
Linux Shell
linux自动崩溃,模拟测试
该脚本创建一个 systemd 服务和定时器,在系统启动3分钟后触发崩溃。通过向 /proc/sysrq-trigger 写入 "c" 来实现内核崩溃,用于测试系统崩溃后的恢复机制。
62 3
|
2月前
|
安全 Linux iOS开发
Burp Suite Professional 2025.7 (macOS, Linux, Windows) - Web 应用安全、测试和扫描
Burp Suite Professional 2025.7 (macOS, Linux, Windows) - Web 应用安全、测试和扫描
308 0
Burp Suite Professional 2025.7 (macOS, Linux, Windows) - Web 应用安全、测试和扫描
|
3月前
|
安全 Linux 网络安全
Metasploit Pro 4.22.7-2025061201 (Linux, Windows) - 专业渗透测试框架
Metasploit Pro 4.22.7-2025061201 (Linux, Windows) - 专业渗透测试框架
113 3
Metasploit Pro 4.22.7-2025061201 (Linux, Windows) - 专业渗透测试框架
|
1月前
|
SQL 安全 Linux
Metasploit Pro 4.22.8-2025073001 (Linux, Windows) - 专业渗透测试框架
Metasploit Pro 4.22.8-2025073001 (Linux, Windows) - 专业渗透测试框架
85 0
|
4月前
|
安全 Unix Linux
Metasploit Pro 4.22.7-2025052201 (Linux, Windows) - 专业渗透测试框架
Metasploit Pro 4.22.7-2025052201 (Linux, Windows) - 专业渗透测试框架
115 5
Metasploit Pro 4.22.7-2025052201 (Linux, Windows) - 专业渗透测试框架
|
4月前
|
安全 前端开发 Linux
Immunity CANVAS Professional 7.27 (macOS, Linux, Windows) - 渗透测试和漏洞利用平台
Immunity CANVAS Professional 7.27 (macOS, Linux, Windows) - 渗透测试和漏洞利用平台
152 3
Immunity CANVAS Professional 7.27 (macOS, Linux, Windows) - 渗透测试和漏洞利用平台
|
4月前
|
安全 测试技术 Linux
Flawnter 5.9.1 (macOS, Linux, Windows) - 应用程序安全测试软件
Flawnter 5.9.1 (macOS, Linux, Windows) - 应用程序安全测试软件
137 2
Flawnter 5.9.1 (macOS, Linux, Windows) - 应用程序安全测试软件
|
4月前
|
数据采集 安全 Linux
Metasploit Pro 4.22.7-2025051201 (Linux, Windows) - 专业渗透测试框架
Metasploit Pro 4.22.7-2025051201 (Linux, Windows) - 专业渗透测试框架
93 4
Metasploit Pro 4.22.7-2025051201 (Linux, Windows) - 专业渗透测试框架
|
4月前
|
Linux 网络安全 iOS开发
Metasploit Framework 6.4.63 (macOS, Linux, Windows) - 开源渗透测试框架
Metasploit Framework 6.4.63 (macOS, Linux, Windows) - 开源渗透测试框架
102 4
Metasploit Framework 6.4.63 (macOS, Linux, Windows) - 开源渗透测试框架
|
10月前
|
安全 Linux 虚拟化