How can I make a router using CentOS 7
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
Route a print server
I am asking this community for some advice on routing using a CentOS 7 server. This situation is as follows:
I have an external print server (letâÂÂs say itâÂÂs on subnet 10.0.0.0/24 with an IP of 10.0.0.13).
I have a CentOS 7 server with external IP of 10.0.0.5 on eth0 and an internal IP of 198.162.0.130 on eth1. This internal NIC is connected to a printer that has an IP of 10.0.0.4.
Here is what I have tried:
1) Enabling ip forwarding
echo net.ipv4.ip_forward=1 >> /etc/sysctl.conf
2) Adding a route
ip route add 10.0.0.4 dev eth1
3) Attempted adding a rule
ip rule add nat 10.0.0.4 from 10.0.0.13
(CentOS responded that this command is deprecated)
4) IâÂÂve attempted a lot of things using shorewalld, firewalld, and iptables.service. Right now I have iptables service enabled and have issued the following commands (policy on all chains set to drop, exclusions being accept on port 22 and 9100)
iptables -A FORWARD -p tcp âÂÂdport 9100 -m conntrack âÂÂctstate NEW,ESTABLISHED -j ACCEPT
iptables -A FORWARD -p tcp âÂÂsport 9100 -m conntrack âÂÂctstate ESTABLISHED -j ACCEPT
(Including variations on these commands that include specific IP addresses and interface names).
5) IâÂÂve even modified the network-scripts for my eth0 file to include the IP address of the printer (note printer and print server are on the same subnet).
centos networking iptables routing
New contributor
add a comment |Â
up vote
0
down vote
favorite
Route a print server
I am asking this community for some advice on routing using a CentOS 7 server. This situation is as follows:
I have an external print server (letâÂÂs say itâÂÂs on subnet 10.0.0.0/24 with an IP of 10.0.0.13).
I have a CentOS 7 server with external IP of 10.0.0.5 on eth0 and an internal IP of 198.162.0.130 on eth1. This internal NIC is connected to a printer that has an IP of 10.0.0.4.
Here is what I have tried:
1) Enabling ip forwarding
echo net.ipv4.ip_forward=1 >> /etc/sysctl.conf
2) Adding a route
ip route add 10.0.0.4 dev eth1
3) Attempted adding a rule
ip rule add nat 10.0.0.4 from 10.0.0.13
(CentOS responded that this command is deprecated)
4) IâÂÂve attempted a lot of things using shorewalld, firewalld, and iptables.service. Right now I have iptables service enabled and have issued the following commands (policy on all chains set to drop, exclusions being accept on port 22 and 9100)
iptables -A FORWARD -p tcp âÂÂdport 9100 -m conntrack âÂÂctstate NEW,ESTABLISHED -j ACCEPT
iptables -A FORWARD -p tcp âÂÂsport 9100 -m conntrack âÂÂctstate ESTABLISHED -j ACCEPT
(Including variations on these commands that include specific IP addresses and interface names).
5) IâÂÂve even modified the network-scripts for my eth0 file to include the IP address of the printer (note printer and print server are on the same subnet).
centos networking iptables routing
New contributor
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Route a print server
I am asking this community for some advice on routing using a CentOS 7 server. This situation is as follows:
I have an external print server (letâÂÂs say itâÂÂs on subnet 10.0.0.0/24 with an IP of 10.0.0.13).
I have a CentOS 7 server with external IP of 10.0.0.5 on eth0 and an internal IP of 198.162.0.130 on eth1. This internal NIC is connected to a printer that has an IP of 10.0.0.4.
Here is what I have tried:
1) Enabling ip forwarding
echo net.ipv4.ip_forward=1 >> /etc/sysctl.conf
2) Adding a route
ip route add 10.0.0.4 dev eth1
3) Attempted adding a rule
ip rule add nat 10.0.0.4 from 10.0.0.13
(CentOS responded that this command is deprecated)
4) IâÂÂve attempted a lot of things using shorewalld, firewalld, and iptables.service. Right now I have iptables service enabled and have issued the following commands (policy on all chains set to drop, exclusions being accept on port 22 and 9100)
iptables -A FORWARD -p tcp âÂÂdport 9100 -m conntrack âÂÂctstate NEW,ESTABLISHED -j ACCEPT
iptables -A FORWARD -p tcp âÂÂsport 9100 -m conntrack âÂÂctstate ESTABLISHED -j ACCEPT
(Including variations on these commands that include specific IP addresses and interface names).
5) IâÂÂve even modified the network-scripts for my eth0 file to include the IP address of the printer (note printer and print server are on the same subnet).
centos networking iptables routing
New contributor
Route a print server
I am asking this community for some advice on routing using a CentOS 7 server. This situation is as follows:
I have an external print server (letâÂÂs say itâÂÂs on subnet 10.0.0.0/24 with an IP of 10.0.0.13).
I have a CentOS 7 server with external IP of 10.0.0.5 on eth0 and an internal IP of 198.162.0.130 on eth1. This internal NIC is connected to a printer that has an IP of 10.0.0.4.
Here is what I have tried:
1) Enabling ip forwarding
echo net.ipv4.ip_forward=1 >> /etc/sysctl.conf
2) Adding a route
ip route add 10.0.0.4 dev eth1
3) Attempted adding a rule
ip rule add nat 10.0.0.4 from 10.0.0.13
(CentOS responded that this command is deprecated)
4) IâÂÂve attempted a lot of things using shorewalld, firewalld, and iptables.service. Right now I have iptables service enabled and have issued the following commands (policy on all chains set to drop, exclusions being accept on port 22 and 9100)
iptables -A FORWARD -p tcp âÂÂdport 9100 -m conntrack âÂÂctstate NEW,ESTABLISHED -j ACCEPT
iptables -A FORWARD -p tcp âÂÂsport 9100 -m conntrack âÂÂctstate ESTABLISHED -j ACCEPT
(Including variations on these commands that include specific IP addresses and interface names).
5) IâÂÂve even modified the network-scripts for my eth0 file to include the IP address of the printer (note printer and print server are on the same subnet).
centos networking iptables routing
centos networking iptables routing
New contributor
New contributor
edited 4 mins ago
Rui F Ribeiro
37.1k1274118
37.1k1274118
New contributor
asked 6 mins ago
Sheldon
12
12
New contributor
New contributor
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sheldon is a new contributor. Be nice, and check out our Code of Conduct.
Sheldon is a new contributor. Be nice, and check out our Code of Conduct.
Sheldon is a new contributor. Be nice, and check out our Code of Conduct.
Sheldon is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f476427%2fhow-can-i-make-a-router-using-centos-7%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password