Just as a followup a network diagram would look something like this
INTERNET
|
|
| Dhcp assigned
| address: eth0
| 24.100.166.121
|
----- NOTE this linux box
--L-- runs IPtables.
--Y--
--N--
--I--
--X--
----- eth1
| IP address 192.168.1.1
| 255.255.255.0
|
----- IP address 192.168.1.2
--X-- 255.255.255.0
--P-- gateway 192.168.1.1
------
Hope that makes it clearer
Main Topics
Browse All Topics





by: zekkerPosted on 2003-03-21 at 15:23:57ID: 8184506
Hi.
ard
Firstly you have NO IP address on your inside NIC.
eth1 Link encap:Ethernet HWaddr 00:A0:24:80:72:EC
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:6
collisions:0 txqueuelen:100
RX bytes:0 (0.0 b) TX bytes:2052 (2.0 Kb)
Interrupt:5 Base address:0xe800
Is this where you are trying to get your DHCP address? im not entirely clear on it.
You can do this for now since you only have the one XP box on the inside.
Setup your internal IP to be this and make them all static
you can type in setup and go to the network section and take off DHCP from the eth1 nick.
Linux Firewall
eth0 : use DHCP
eth1 :
IP address 192.168.1.1
netmaks 255.255.255.0
XP :
IP address : 192.168.1.10
255.255.255.0
Default gateway : 192.168.1.1
Eth 0 on the fireall will have a default gateway setup
Next you will have to enable routing on your firewall and Network Address Translation
echo "1" > /proc/sys/net/ipv4/ip_forw
iptables -t nat -A POSTROUTING --o eth0 -j MASQUERADE
You will need to run iptables, go to google and check out the IPTABLES Howto. lots there but that command i put in will be part of it. That will enable masquerading on your external nic. Using static addressing on the inside is fine, you dont need DHCP, unless of course you just want to run it to learn it.
here is a sample config of a cable model connected linux bo
eth0 Link encap:Ethernet HWaddr 00:D0:B7:19:F5:50
inet addr:100.112.211.24 Bcast:24.100.166.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2531056 errors:0 dropped:0 overruns:0 frame:0
TX packets:1422956 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:1370435202 (1306.9 Mb) TX bytes:611338292 (583.0 Mb)
Interrupt:11 Base address:0x7000
eth1 Link encap:Ethernet HWaddr 00:A0:CC:79:9A:7E
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1141020 errors:0 dropped:0 overruns:0 frame:0
TX packets:1218942 errors:2 dropped:0 overruns:2 carrier:2
collisions:0 txqueuelen:100
RX bytes:598811239 (571.0 Mb) TX bytes:1278339193 (1219.1 Mb)
Interrupt:11 Base address:0xc000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4155 errors:0 dropped:0 overruns:0 frame:0
TX packets:4155 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:189502 (185.0 Kb) TX bytes:189502 (185.0 Kb)
hope that helps.!
- Zekker - and yes the IP on my sample on eth0 is fake ;-)