Well , you must use some kind of tunneling to access an ip address from eth0's network through eth1 . But there are two ways to connect this "stupiq" :)) user to Internet - two stupid , but usefull chanses I think .
First - ask your provider give you a little ( may be /30) real network and do eth1:0 with this .
Second (more stupid , because you will not be ableto control that user) - lay a switch before eth0 and connect the user to it , and give him a real ip address .
Main Topics
Browse All Topics





by: philjones85Posted on 2003-07-12 at 14:15:14ID: 8909887
use masquerading, this script should help, just setup default gateway (for the internal computer) to the machine running this. ---------- ---------- ------
ard cookies h0/rp_filt er h1/rp_filt er h0/accept_ source_rou te h1/accept_ source_rou te
--------------------------
#!/bin/bash
echo -n "Removing ipchains crap: "
rmmod ipchains
insmod ip_tables
echo
echo -n "Setup system parameters: "
echo 1 > /proc/sys/net/ipv4/ip_forw
echo 1 > /proc/sys/net/ipv4/tcp_syn
echo 1 > /proc/sys/net/ipv4/conf/et
echo 1 > /proc/sys/net/ipv4/conf/et
echo 0 > /proc/sys/net/ipv4/conf/et
echo 0 > /proc/sys/net/ipv4/conf/et
echo
echo -n "Flush old tables: "
iptables -t nat -F PREROUTING
iptables -t nat -F OUTPUT
iptables -t nat -F POSTROUTING
echo
echo -n "Setting up masquerading: "
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE
echo