Linux 시스템의 Win98에서 TUN/TAP을 사용하여 Bochs와 네트워크를 설정하려고 합니다.
내 설정 중 일부는 다음과 같습니다(Windows 98).
IP Address
Specify IP address
IP Address: 192.168.1.2
Subnet Mask 255.255.255.0
DNS Configuration
Host: catch22bbs Domain: com
DNS Server Search Order
192.168.1.10
Installed gateways
192.168.1.10
이 내 꺼야bochsrc.txt
megs: 724
cpu: count=1, ips=25000000, reset_on_triple_fault=1, ignore_bad_msrs=1
# filename of ROM images
romimage: file=BIOS-bochs-latest
vgaromimage: file=VGABIOS-lgpl-latest
vga: extension=cirrus, update_freq=25
pci: enabled=1, chipset=i440fx, slot1=cirrus
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata0-master: type=disk, path="win98.img"
journal=vvfat.redolog
ata1-master: type=cdrom, path="win98.iso", status=inserted
boot: disk
config_interface: textconfig
#display_library: x
# other choices: win32 sdl wx carbon amigaos beos macintosh nogui rfb term svga
log: bochsout.txt
sb16: enabled=1
mouse: enabled=1
sb16: wavemode=1, dmatimer=500000
clock: sync=none, time0=1
ne2k: ioaddr=0x300, irq=3, mac=fe:fd:00:00:00:01, ethmod=tuntap, ethdev=/dev/net/tun, script=/root/Downloads/ANDROID/bochs/img/tunconfig
이것은 내 tunconfig
스크립트입니다.
#!/bin/bash
/sbin/ifconfig ${1##/*/} 192.168.1.0
/sbin/iptables -D POSTROUTING -t nat -s 192.168.1.0 -d ! 192.168.1.0 -j MASQUERADE >& /dev/null
/sbin/iptables -t nat -s 192.168.1.0 -d ! 192.168.1.0 -A POSTROUTING -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
ifconfig tun 192.168.1.0 up
route del -net 192.168.1.0 netmask 255.255.255.0 dev tun
route add -net 192.168.1.2 netmask 255.255.255.255 dev tun
echo 1 > /proc/sys/net/ipv4/conf/tun/proxy_arp
arp -Ds 192.168.1.0 tun pub
이것이 중요한지 확실하지 않지만 실제 IP(Linux 측)는 다음과 같습니다.
192.168.1.10
그래서 내 질문은: 내 설정이 올바른가요?
감사해요.