LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-02-2004, 04:56 PM   #1
_matt_24
LQ Newbie
 
Registered: Jul 2004
Posts: 1

Rep: Reputation: 0
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
About Slackware 9.1 boot disk?? ftp://ftp.kpn.be/pub/linux/slackware/slackware-9.1-is AL3OMDAH Slackware 4 04-18-2007 10:54 AM
Dual boot windows/slackware, but slackware installed first? Cryptic_K Slackware 3 11-20-2006 01:49 PM
Slackware 10 RC2 released; Slackware 10 imminent... SBing Slackware 22 06-22-2004 08:53 AM
Newer Slackware Packages on older slackware version pengStudent Slackware 2 11-12-2003 01:47 PM
wine and winesetuptk working well with slackware 9.0 and slackware 9.1 oobe Linux - Software 0 10-19-2003 01:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration