Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi all
i have 1 nic in my linux machine and i want to use it as a router
i have created an alias eth0:1
my eth0 is 10.10.1.1 255.255.255.0 (i wanna use this as dhcp as well)
my eth0:1 is 192.168.1.102 255.255.255.0 (my crappy router is 192.168.1.1)
how do i forward all traffic from eth0 through eth0:1
im going to try this and if succsefull a squid with QoS
ok ill start again..
i have 1 imac g4 (ubuntu server, dhcp, dns, web, email) this only has one nic.
this is connected to my crappy di-624 router, i also have a desktop box and a few lappys.
what i want to do is have all lan traffic pass through the di-624 to the linux machine and then filtered it on the linux box. i also want to use it as a squid with qos.
i have created eth0:1 on a totally different subnet. i want eth0 for dhcp and eth0:1 for external(internet facing)
so here is my interfaces..
# The primary network interface
auto eth0
iface eth0 inet static
address 10.10.1.1
netmask 255.255.255.0
auto eth0:1
iface eth0:1 inet static
address 192.168.1.101
netmask 255.255.255.0
gateway 192.168.1.1
the 10. range is going to be the local subnet and the 192 range is the external to the router.
cat /proc/sys/net/ipv4/ip_forward = 1
but this changes back to 0 after reboot
here is my rotue on the linux machine
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
10.10.1.0 * 255.255.255.0 U 0 0 0 eth0
link-local * 255.255.0.0 U 1000 0 0 eth0
default 192.168.1.1 0.0.0.0 UG 100 0 0 eth0
now if i turn my dhcp router on the dlink off and the dhcp on my nix machine on it servers ips fine.
from my xp machine on the nix dhcp range.
ping 10.10.1.1 reply (nix eth0)
ping 192.168.1.101 reply (nix eth0:1)
ping 192.168.1.1 fail (dlink router)
so i can basically talk to the local network but not to my dlink..
so i cant pass traffic from 10.10.1.1 through the 192.168.1.101 to the dlink 192.168.1.1 internet facing address
i dont have any firewall on my nix machine yet... i was going to add that after i got the eth0 and eth0:1 talking properly
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.