LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Slackware + 5 IP (https://www.linuxquestions.org/questions/linux-networking-3/slackware-5-ip-200426/)

_matt_24 07-02-2004 03:56 PM

Slackware + 5 IP
 
Hi,
this is my configuration...

first file (rc.inet1)
#! /bin/sh
# rc.inet1
IPADDR="83.*.*.154"
NETMASK="255.255.255.248"
GATEWAY="83.*.*.153"
IPADDR1="10.0.1.1"
NETMASK1="255.255.255.0"
/sbin/ifconfig lo 127.0.0.1
/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo
BROADCAST=`/bin/ipmask $NETMASK $IPADDR | cut -f 1 -d ' '`
NETWORK=`/bin/ipmask $NETMASK $IPADDR | cut -f 2 -d ' '`
/sbin/ifconfig eth0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}
/sbin/ifconfig eth1 ${IPADDR1} netmask ${NETMASK1}
/sbin/route add default gw ${GATEWAY} metric 1
# End of /etc/rc.d/rc.inet1

and the second (rc.masq)
#!/bin/sh
IPADDR_ZEW="83.*.*.154"
ETH_ZEW="eth0"
IP_WEW="10.0.1.0/24"
/usr/sbin/iptables -F -t nat
/usr/sbin/iptables -X -t nat
/usr/sbin/iptables -F -t filter
/usr/sbin/iptables -X -t filter
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o ${ETH_ZEW} -j SNAT -s ${IP_WEW} -d 0/0 --to ${IPADDR_ZEW}

Everything works fine, but I have 4 free IPs
83.*.*.155
83.*.*.156
83.*.*.157
83.*.*.158
how to make eg 10.0.1.17 to use one of my free IP? I want to have on this IP www running and other stuff that was blocked due to NAT translation.
Thanks for help:)


All times are GMT -5. The time now is 01:27 PM.