LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-17-2018, 07:22 AM   #1
jooseph
LQ Newbie
 
Registered: Dec 2018
Location: netherlands
Distribution: fedora
Posts: 3

Rep: Reputation: Disabled
Unhappy Network settings for a Fedora29 Server with two networkcards to act as a router to the internet for my Fedora29 Workstation


what basic network settings will make my Fedora 29 Server with two network cards act as a router to the internet for my Fedora 29 Workstation?

I prefer to use basic tools only, i.e. static IP configuration (no dhcp), no DNS and no virtual machines.

Many thanks for any tips


network settings of my router are:

ip addr show:
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:0e:c4:ce:3a:0d brd ff:ff:ff:ff:ff:ff
inet 10.0.0.1/24 brd 10.0.0.255 scope global noprefixroute enp2s0 valid_lft forever preferred_lft forever
3: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:0e:c4:ce:3a:0e brd ff:ff:ff:ff:ff:ff
inet 217.xxx.144.28/29 brd 217.xxx.144.31 scope global noprefixroute enp3s0 valid_lft forever preferred_lft forever

ip route show:
default via 217.xxx.144.25 dev enp3s0 proto static metric 100
10.0.0.0/24 dev enp2s0 proto kernel scope link src 10.0.0.1 metric 101
217.xxx.144.24/29 dev enp3s0 proto kernel scope link src 217.xxx.144.28 metric 100


sysctl net.ipv4.ip_forward:
net.ipv4.ip_forward = 1


network settings of my workstation are:

ip addr show:
2: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 50:7b:9d:be:75:d9 brd ff:ff:ff:ff:ff:ff
inet 10.0.0.3/24 brd 10.0.0.255 scope global noprefixroute enp0s31f6 valid_lft forever preferred_lft forever


ip route show:
default via 10.0.0.1 dev enp0s31f6 proto static metric 20100
10.0.0.0/24 dev enp0s31f6 proto kernel scope link src 10.0.0.3 metric 100

sysctl net.ipv4.ip_forward:
net.ipv4.ip_forward = 1
 
Old 12-17-2018, 07:46 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
There are many tutorials out there. Your favourite search engine knows how to find them, for example router fedora gives you a long list including https://fedoramagazine.org/use-fedor...outer-gateway/.
 
Old 12-17-2018, 09:38 AM   #3
jooseph
LQ Newbie
 
Registered: Dec 2018
Location: netherlands
Distribution: fedora
Posts: 3

Original Poster
Rep: Reputation: Disabled
Unhappy

Thank you for you reply, I'm aware of https://fedoramagazine.org/use-fedor...outer-gateway/. The example assumes a specific Internet provider, pushes into using extra tools and doesn't bring a working solution
 
Old 12-17-2018, 11:41 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
If your router machine is running a desktop using the firewall-config GUI configuration tool might be easier to use then the command line. Here is guide using CentOS 7 but the steps should be the same.

In summary you need to define which interface is external and which is internal and add rules to forward from internal to external and masquerade to perform NAT from external to internal.

https://linuxize.com/post/how-to-set...d-on-centos-7/
 
1 members found this post helpful.
Old 12-18-2018, 01:42 AM   #5
jooseph
LQ Newbie
 
Registered: Dec 2018
Location: netherlands
Distribution: fedora
Posts: 3

Original Poster
Rep: Reputation: Disabled
Dear michaelk, thank you for your tips. It works!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Lightweight router distro that can act as an internet/ISP router Red Squirrel Linux - Networking 3 01-28-2015 07:09 PM
internet access with 2 networkcards and suse 11.1 Paul7 Linux - Networking 1 11-06-2009 11:06 AM
how do I disable one of my two networkcards when booting up? lvanharen Linux - Newbie 1 02-18-2009 02:30 PM
cordless router and cordless networkcards bookie Linux - Hardware 15 01-22-2008 01:24 AM
Two Networkcards Steffen.Stein Linux - Networking 1 03-28-2005 04:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration