资讯专栏INFORMATION COLUMN

ipxe net boot configure (dnsmasq qemu iptables ...

BoYang / 2579人阅读

摘要:

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 net boot configure (dnsmasq qemu iptables ...

    摘要: 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...

    mochixuan 评论0 收藏0
  • dnsmasq+nginx缓存

    环境: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...

    chenatu 评论0 收藏0
  • linux kvm qemu network bridge tap configure

    摘要: 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...

    zhaochunqi 评论0 收藏0
  • 编译可在Android上运行的qemu user mode

    摘要:意味着编译出的程序只能在机器上执行。当命令行中有选项时,脚本中的禁用宏将被设置为,这个宏默认为。当宏为时,会对宏进行设置,下面是与有关的设置宏的代码脚本会将宏的内容写入文件。 前言 本文在Ubuntu 64位系统上对qemu项目进行交叉编译,并且只编译与qemu user mode有关的代码。下文中的NDK若无特殊说明均指Android NDK。下文中$NDK表示的是NDK的根目录。 ...

    LMou 评论0 收藏0
  • Nginx之OCSP stapling配置

    摘要:摘要正确地配置可以提高性能。顾名思义,它是一个用于检查证书状态的协议,浏览器使用这个协议来检查证书是否被撤销。存在隐私和性能问题。检测能够对开启的网站的配置进行全面分析,可以检测的状态。根据文档,最好使用本地服务,可以防止欺骗。 摘要: 正确地配置OCSP stapling, 可以提高HTTPS性能。 showImg(https://segmentfault.com/img/bV45G...

    CastlePeaK 评论0 收藏0

发表评论

0条评论

最新活动
阅读需要支付1元查看
<