Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
i have some problem Nating and i hope some dude out there have a solution. This is urgent and i am looking for some help immediately
I have a Linux(7.3) box with two NIC and working like a gateway
NIC 1 - 10.8.1.91
NIC 2 - 10.6.1.91
i have one linux box with ip 10.6.1.100 connected to NIC 2 and some machines conected to 10.8.1.91 network connected via switch. I have routed packets from 10.8.1.X network to 10.6.1.100 machine...
Now since routing is working fine i assume routing is proper.
Problem Defination.
I want no-one to see 10.6.1.91 machine and there is need for nating...(i assume) going through some site i tried to add following to my iptable nating
The pinging probably works because you've add all those routes which if you're doing NAT you won't have to do, so reboot and don't put them in again (though keep a copy)
Assuming the object is to get from 10.8.1.x to 10.6.1.00
Assuming: 10.8.1.91 is eth0 static IP, subnet mask set, don't set a gateway
Assuming: 10.6.1.91 is eth1 static IP, subnet mask set, set a gateway to 10.6.1.100 for eth1 if that's the route to the internet or somewhere else, otherwise you need
not bother
activate ip forwarding first
echo 1 > /proc/sys/net/ipv4/ip_forward
Oops I've read what you want to do wrong methinks.
iptables -F
iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP
iptables -A INPUT -p ALL -i lo -s 127.0.0.1 -j ACCEPT
iptables -A INPUT -p ALL -i lo -s 10.6.1.91 -j ACCEPT
iptables -A INPUT -p ALL -i lo -s 10.8.1.91 -j ACCEPT
iptables -A INPUT -p ALL -i eth0 -s 10.8.1.0/24 -j ACCEPT
iptables -A INPUT -p ALL -d 10.6.1.91 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i eth0 -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED, RELATED -j ACCEPT
iptables -A OUTPUT -p ALL -s 127.0.0.1 -j ACCEPT
iptables -A OUTPUT -p ALL -s 10.6.1.91 -j ACCEPT
iptables -A OUTPUT -p ALL -s 10.8.1.91 -j ACCEPT
thanxs for the info ....but i am still confused n would appreciate if i can get ur email id on which i can send u a diagram of my network so that u can get a clear picture of my problem
It's probaby better for you if you post it on here as you'll have the benefit of a whole lot of other people who if I'm not able to help they probably will be able to
Many hands make light work and they'll be able to scrutinize, if you're doing a diagram stick it in-between [ code ] [ /code ] tags(without the spaces in the brackets) so it keeps it's shape
but please don't hijack people's threads like this... you should open your own thread in the newbie forum after having searched and confirmed your question hasn't already been answered... good luck!!!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.