E
E
Evgeny Petryaev2019-07-19 19:43:42
Computer networks
Evgeny Petryaev, 2019-07-19 19:43:42

Get muscle from home?

In general, you need to reach through the Internet to the muscle server located behind the router and proxy, here is the scheme 5d31f32befdf9521641436.jpeg, muscle 0.3. I added such a rule on 1.1, 5d31fcf3e96da768512838.jpegnow 0.2 is pinged 5d31ff58751fc880183726.jpegand another 0.254 is also pinging from 192.168.1.1,
but packets from 1.1 to 0.3 do not reach. I add this rule on 192.168.0.2 , route add -net 192.168.0.0 netmask 255.255.255.0 gateway 192.168.0.254 eth0 I get an error: SIOCADDRT: Network is unreachable

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evgeny Petryaev, 2019-07-23
@Gremlin92

5d374de1038ee757922449.jpeg
This and this helped .

sudo iptables -A FORWARD -i enp3s1 -o enp3s0 -p tcp --syn --dport 3306 -m conntrack --ctstate NEW -j ACCEPT
sudo iptables -A FORWARD -i enp3s1 -o enp3s0 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
sudo iptables -A FORWARD -i enp3s0 -o enp3s1 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
sudo iptables -t nat -A PREROUTING -i enp3s1 -p tcp --dport 3306 -j DNAT --to-destination 192.168.0.3
sudo iptables -t nat -A POSTROUTING -o enp3s0 -p tcp --dport 3306 -d 192.168.0.3 -j SNAT --to-source 192.168.1.2

Now reached out from home

D
Dmitry Derepko, 2019-07-19
@xEpozZ

What's the question?
Tunnel to the desired point and connect

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question