linux ipchains command

GO TO ADMIN PANEL > ADD-ONS AND INSTALL VERTIFORO SIDEBAR TO SEE FORUMS AND SIDEBAR

Amon

Staff member
Joined
Sep 16, 2005
Messages
543
Points
16
Age
35
Location
Canada
Here is the situation. I am running a window pc hooked up to a linux box running kernel 2.2.16. I was able to set the box up as a DHCP server and was able to assign an ip address to the windows pc. What I am trying to now is forward all packets from the pc to the internet otherwords access the internet from the pc which is hooked up to the linux box. PC is hooked up to the box on eth1, internet is eth0. How can I do this using the ipchains command?

something a long the lines of IPCHAINS -A forward -i eth0 -s 192.168.2.0 -p all -d 192.168.1.0

fyi i have no idea what i am doing :p first time i am touching linux
 

toggi3

New Member
Joined
Apr 10, 2011
Messages
1
Points
1
Amon said:
Here is the situation. I am running a window pc hooked up to a linux box running kernel 2.2.16. I was able to set the box up as a DHCP server and was able to assign an ip address to the windows pc. What I am trying to now is forward all packets from the pc to the internet otherwords access the internet from the pc which is hooked up to the linux box. PC is hooked up to the box on eth1, internet is eth0. How can I do this using the ipchains command?

something a long the lines of IPCHAINS -A forward -i eth0 -s 192.168.2.0 -p all -d 192.168.1.0

fyi i have no idea what i am doing
first time i am touching linux
I'm going to assume both use a subnet of 255.255.255.0

I think you are looking to create a route for a gateway with one network being 192.168..2.0/24 (the one served by the DHCP daemon on your linux box) and another network being 192.168.1.0/24 yes?

I *think* what you want is:

ipchains -i (private LAN) -s 192.168.2.0/24 -p all -d 192.168.1.0/24

but without a box with ipchains on it I have no real idea and cant verify.

I might suggest you try using something with iptables instead or maybe at least a full system designed to be a firewall/router such as Vyatta or pfSense. Have fun.
 
Top