摘要:
IPxe Boot step by step
brctl addbr net
ifconfig net 10.0.1.1/24 up
edit the dnsmasq.conf like dnsmasq.conf_pxe_boot
/etc/init.d/dnsmasq start
enable tftp server; then you should disable tftp-hpa service service tftp-hpa stop
configure the interface as your need
configure dhcp-sequential-ip get a ip in order
!! or you can use the command line to start the dnsmasq
/usr/sbin/dnsmasq -C /etc/dnsmasq.conf -x /var/run/dnsmasq/dnsmasq.pid -u dnsmasq -r /var/run/dnsmasq/resolv.conf -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-service
dnsmasq --strict-order --bind-interfaces --conf-file= --listen-address 10.0.1.1 --dhcp-range 10.0.1.2,10.0.1.254 --dhcp-lease-max=253 --dhcp-no-override --except-interface=lo --interface=net --dhcp-sequential-ip --dhcp-leasefile=/var/lib/misc/dnsmasq.lxcbr0.leases --dhcp-authoritative
dnsmasq --strict-order --bind-interfaces --conf-file= --listen-address 10.0.1.1 --dhcp-range 10.0.1.2,10.0.1.254 --dhcp-lease-max=253 --dhcp-no-override --except-interface=lo --interface=net --dhcp-sequential-ip --enable-tftp --tftp-root=/var/lib/tftpboot --dhcp-match=set:IPXEBOOT,175 --dhcp-option=tag:!IPXEBOOT,67,undionly.kpxe --dhcp-option=67,pxelinux.0 --dhcp-leasefile=/var/lib/misc/dnsmasq.lxcbr0.leases --dhcp-authoritative
Ipxe boot test !!! PXEBOOT conf is not here!
qemu-system-x86_64 --enable-kvm -cpu host -m 2G -net nic -net tap,script=/etc/ifup,downscript=/etc/ifdown
example for /etc/qemu-ifup
#!/bin/sh set -x switch=net if [ -n "$1" ];then # /usr/bin/sudo /usr/sbin/tunctl -u `whoami` -t $1 /usr/bin/sudo /sbin/ip link set $1 up sleep 0.5s /usr/bin/sudo /sbin/brctl addif $switch $1 exit 0 else echo "Error: no interface specified" exit 1 fi
/etc/qemu-ifdown
#!/bin/sh set -x switch=net echo "Executing /etc/qemu-ifdown" sudo /sbin/ip link set $1 down sudo /sbin/brctl delif $switch $1 sudo /sbin/ip link delete dev $1
iptables conf for net
iptables -t nat -A POSTROUTING -s 10.0.1.0/24 ! -d 10.0.1.0/24 -j MASQUERADE -- enable net
port forward:
iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 587 -j DNAT --to-destination 10.0.3.100:587
nothing to be done else! & enjoy it!!!
文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。
转载请注明本文地址:https://www.ucloud.cn/yun/7805.html
摘要: IPxe Boot step by step brctl addbr net ifconfig net 10.0.1.1/24 up edit the dnsmasq.conf like dnsmasq.conf_pxe_boot /etc/init.d/dnsmasq start enable tftp server; then you should disable tftp...
环境:centos7,软件:dnsmasq,nginx 服务器ip址址:192.168.0.133 一.安装dnsmasq: 需要安装epel源:rpm -Uvh http://dl.fedoraproject.org/p... (主要是提供tinyproxy的rpm包)yum updateyum install dnsmasq -y3.修改配置文件:1.vim /etc/dnsmasq.conf...
摘要: userspace network : -net nic,model=virtio,macaddr=xx-xx-xx-xx-xx -net user bridge network: -net nic,xxxx -net -tap Kvm network bridge tap edit /etc/network/interfaces Install :sudo apt...
摘要:意味着编译出的程序只能在机器上执行。当命令行中有选项时,脚本中的禁用宏将被设置为,这个宏默认为。当宏为时,会对宏进行设置,下面是与有关的设置宏的代码脚本会将宏的内容写入文件。 前言 本文在Ubuntu 64位系统上对qemu项目进行交叉编译,并且只编译与qemu user mode有关的代码。下文中的NDK若无特殊说明均指Android NDK。下文中$NDK表示的是NDK的根目录。 ...
摘要:摘要正确地配置可以提高性能。顾名思义,它是一个用于检查证书状态的协议,浏览器使用这个协议来检查证书是否被撤销。存在隐私和性能问题。检测能够对开启的网站的配置进行全面分析,可以检测的状态。根据文档,最好使用本地服务,可以防止欺骗。 摘要: 正确地配置OCSP stapling, 可以提高HTTPS性能。 showImg(https://segmentfault.com/img/bV45G...
阅读 6436·2021-09-22 15:08
阅读 1652·2021-09-14 17:57
阅读 1552·2021-08-24 10:03
阅读 2293·2021-08-20 09:36
阅读 1069·2020-12-03 17:22
阅读 2292·2019-08-30 15:55
阅读 667·2019-08-29 16:13
阅读 2949·2019-08-29 12:41